@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21



Comments:

<0> we got a foul
<1> yes but more powerful, since u can test everything
<2> hey toast `;]
<1> m0th3r facker !
<1> sup ;)
<1> why is ur clone in the french chan with a diff nick
<2> hmm
<2> whaddaya mean ?
<2> ah
<2> got a session @ work too
<1> me 2 papa
<1> :D
<1> rofl
<3> I R Hungry
<4> $var = "01"; $var++; is giving 2, how can i make it 02 .. then 10 , 11 ?



<3> format the number?
<4> number.
<5> www.php.net/sprint
<3> i was thinking number_format as he is working with ints
<5> could do that too
<3> sprintf is for strings
<5> still, PHP is not hard typed
<3> eh, workign with ints use int functions, working with strings use string functions, just good habbits ;)
<4> and ?
<4> how can i inc 01 to 02 now ?
<4> number format
<3> oh **** you wanted an leading 0
<3> try a strpad()
<4> yes.
<4> $var++; is giving "2".
<4> strpad ?
<3> or hell do a $var='0'.$var;
<4> :)
<4> i want to inc 01 to 10. 01
<4> 01,02,03...
<4> k,i will use if func with babylogic :)
<3> is odd that you cant format with a leading 0, i'll add that into my "useful functions" extension for php
<4> if($var < "10") { $var = "0".$var; } :p
<4> in while.
<5> still sprintf("%02d", $var);
<5> while not being good practice
<5> fits on a single line
<4> i am using $var++; in while, must i use it.
<5> depends on what you try to do
<5> but if $var is part of the while condition
<5> I'd definitely guess you'd need the $var++
<4> hmm.
<6> can anyone recommend a good PHP editor that works well in Gnome?
<3> gEditPHP
<3> or was it gphpedit
<3> yeah gPHPEdit
<6> is that the same as just gedit? cause that program doesn't do some essential stuff, like the ability to indent a selection and also handles tabs somewhat poorly
<6> oh
<6> i see... guess it is different than simple gedit. i'll check it out
<3> http://www.gphpedit.org/features.phtml
<6> oh sweet! a function/cl***/method browser
<7> wazzap gringos :D
<7> what's the way to use mem pointers in php?
<7> like referenced variables, not actually p***ing the value
<7> anybody?
<7> :>
<8> uhm...
<9> X7C www.php.net/references and dont chanwide notices like that.
<10> hellp LoL
<10> can anyone help me on some "logistic" problem :D?
<10> my head is about to explote lol
<11> Just ask your question, then wait. Someone will answer it if they can or care to.
<10> how can i loop to compare a $var with my array strings ($var = $value) to increment $limit , so i can start my search query using the correct $limit variable :D?
<7> try again :S didn't understand
<7> (i'm collapsed to :p)
<6> yeah, me either
<10> background: a user votes for an image , then it stores the vote , and sends him to the next record of the desired search criteria , but if the next record is an image where he voted before , the program jumps to the next record
<7> why don't you pop those items out of the array
<7> :)
<10> already tried that



<7> so?
<10> i tried with while , do while , if , foreach , etc lol
<10> its not working , i keep getting an "exceeded time" msg
<7> lemme see the code
<10> im thinking its cuz im looping
<10> without any result
<10> where can i paste it?
<7> yeah, you are looping somewhere
<7> www.pastebin.com
<10> ok
<6> you have to break; the loop eventually
<10> im doint it
<6> like when you find the value you want
<10> with a if value = desiredvalue , break
<10> wait let me paste the code
<10> pastebin.com?
<7> yeah
<7> argh coding ****s
<7> i preffer deisgn
<10> hehe im translating to english wait ehehe
<7> man i can't even think about directory names :<
<10> http://pastebin.com/541193
<10> there
<10> :)
<7> hola :)
<7> soy chileno :p
<7> anyway have you tried filterating at the database?
<10> ok pos en espaol se puede no jaja?
<10> o nos sacan? :O
<7> no se
<7> english no ms
<7> it'0s easy anyway
<10> nambre ok ,ni modo
<10> ok
<10> filtering how?
<7> okay, i would try filtering at the database query
<7> i understand that this array has the id's of the pictures the user has voted for right?
<10> yup
<7> so add a loop and print to the query
<7> where loop:[$id NOT LIKE $ar[$hey],]
<7> "SELECT * FROM images WHERE ***o = '$***data' AND loop:[$id NOT LIKE $ar[$hey] AND] ORDER BY id DESC LIMIT " . $limite . ",1"
<7> me explico?
<10> hmm..a user can create like hundreds of arrays
<7> so?
<7> i'm sure teh array won't be more than 200
<10> ohh hehe there will be more than 200
<10> i can limit my arrays
<10> with a counter , every 50 arrays
<10> but i need to know the value of $limite
<10> thats the one that specifies my data row
<10> cuz the voting order is DESC
<7> hm... id preffer to filter in the database
<7> databases are done for that
<10> let me try it like that
<10> im out of ideas and that looks as a good one lol
<10> wait a min :P gonna try it
<7> that way you could select a random picture out of the ones the user hasn't voted for
<7> i think there's more options anyway
<7> some array implode, remove instances of the array and the explode again
<7> it's actually better to remove,
<7> the junk
<7> faster cleaner
<7> use id's as keys for some array and there you can pop them out also
<10> but why isnt my method working i mean
<10> my code , on paper has to work lol
<12> heyya guys
<7> i really don't know
<7> i'm to mind ****ed to understand it really well :<
<10> im just comparing my $value arrays with my next $id , and if it there is a TRUE statement i just add $limit++ and loop
<10> lol
<10> me 2
<10> let me try ur methods


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#linux
mIRC strip color codes php
youdontthink.com
#java
c++ templates stringize
#c++
molodova girl
#chatzone
#london
#linuxhelp



Home  |  disclaimer  |  contact  |  submit quotes