| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Comments:
<0> r0xoR, here's my site: http://www.iceburg.net / http://www.guidospaper.com -- woulda been youtube.. but the pabst got me in 1999 <1> r0xoR, oks oks <2> ok philip i kinda understand this, when i print $file, I see the arrays each starts with [0] < basically like an id, what I know works is $file[0]['filename'] will get the file name for that certain id in the array, what I dont understand is how to output filenames of all arrays? <3> schnoodles, probably "ip" <4> it was a mp3 spam .. <3> schnoodles do you mean data type? <5> ye sorry <3> schnoodles varchar(15) <2> and i dont mean each starts with [0] i mean each has a [with a number inside] :) <2> philip, we getting somewhere now? <3> surfdue, whoa, you're back from thin air! lol <3> hahah! <3> bricecube, both of those are kinda funny... u should set error_level( E_ERROR ); <3> or whatever that function is called... i don't remember <2> r0xoR, do you see what i mean? <3> surfdue, nope, cuz you haven't said anything for the past 5 mins until now
<2> what I just said explains it all! <3> nope, longer than 5 mins <2> $file is an array apparently, I wanna get all the filenames of that array and list them <0> r0xoR, error_display is on for some reason..apparently I was up late as hell debugging things & forgot to turn it off ;) <6> foreach ($file as $f) { echo $r['filename']; } <3> surfdue, like this? http://pastebin.com/661043 <6> well, $f instead of $r of course <3> surfdue, i thought there was only one file <6> you are making this fetch() do too much, imho, consider additional functions for othe tasks <2> u have that code already <2> no there is more now <3> ahhh... a!!! ahhhhaH! <6> or simply call your entire script fetch() :) <3> it's like playing a game with a kid who changes the rules every 3 minutes <3> heheh... can't ever win <2> r0xoR, please all I want to do is list a all the stupid rows in a database. <6> i suggest conceding <2> this isnt that hard. <3> surfdue, well that's fine then... in my case you just add $file[1]["filename"]; <3> surfdue, heheh, apparently it is for you :) <2> it only outputs array number 1 <3> philip, yeah i beleive i suggested that a while back but ****, whatever, i'll humor the poor thing <2> there is 6 files each has the number like that if I put [1] it gives me file info for number 1 <3> surfdue, yup that's right <2> i wanna list them all. <3> surfdue, is the point of the function to OUTPUT the files? or to GET the files so that they CAN be output? <2> output <3> surfdue, ok so when you say that then what that means is that the echo statemens are supposed to go IN the function <3> surfdue, is that what you really mean? <2> no. <2> I want to control the variable <3> hahah <2> ERR i just want it to work like it did before. <6> it's taken 40 minutes to output data from a database <3> sometimes i wonder if you other hax0rz come in here and play dumb just to fool us good hearted folks lol <3> philip, no sh8t <7> foreach( $array_list as $row ) { $var_one = $row["variable_one"]; echo "This is variable one: $var_one"; } <3> it takes me about 3 (minutes that is) <2> it use to just type $file['filename'] and it list them all <4> r0xoR, <4> your arrogance is agigating. just thought you might like to know <3> choongii, yes? <6> surfdue: but you must format what "list them all" means <4> agitating* too <3> choongii, ok thanks for letting me know <2> philip, list them all, meaning if i type $file[0]['filename'] it only gives me the filename for array number 1 <2> there is 6 arrays in $file I want to output them all! <6> "output them all", seperated by spaces, images of jesus, periods... options are unlmiited <3> http://pastebin.com/661050 <3> heheh... my vote is for images of hot chics <3> choongii, sorry if i've offended you, i'm just a little bored and it's friday night... just trying to have fun and be of a little help at the same time <6> ini_set('have_all_output_formatted_as_seen_in_my_mind', true); echo $var; <7> ah <3> rofls @ philip <6> $var can be an array, object, int, anything really :) <3> surfdue, is http://pastebin.com/661050 what you want? <3> surfdue, that should output all 6 <8> i have two arrays that are exactly identical, except that one has an additional field called [id] <7> $rowset = fetch("Your query"); foreach( $rowset as $row ) { $my_name = $row["my_name"]; echo "Me llamo 'es $my_name"; } <3> lorfds, i have a pony <2> yes thank you!
<8> i want to combine the array that has [id] with the one that does not, and have all the values in the one that does not replace their equivalent in the one that does <3> surfdue, heheh there, now that wasn't too hard was it? <2> yes <2> considering i dnt understand one thing that says <6> surfdue: foreach() is good <2> lol <2> foreach didnt work <6> yes it did <2> whats the easier way to do this <6> i am 100% certain foreach() is what you want <7> didn't really look at the pastebin, so if you get: Array as output.. change: foreach( $rowset as $row ) ..to foreach( $rowset as $array => $row ) (most folks only go 2deep) <6> 100% <3> surfdue, easier? pay me to do it <2> i trped foreach($file as $row) { echo $row['filename']; } <3> surfdue, get some sleep <3> no use in rehashing what we all already talked about <6> good point <3> lorfds, uhhh so write a loop to do it... ? <7> lorfds : loop through original array -> if( !in_array( $id, $orig_array ) ) { $new_array[] .= $id } ? <8> is there any way to just append that value <3> lorfds, yeh <3> lorfds, $old_array["id"] = $id_array["id"]; <3> lorfds, $non_id_array["id"] = $id_array["id"]; i guess makes more sense <7> hell, just array_merge() it then..or pop() it <3> lorfds, you can create a new key=>value pair simply by using it in an expression/statement <7> erumm.. push() it thatis <8> what does push() do <6> it does exactly what r0xoR did <3> lorfds php.net/push <6> array_push :) <3> push(philip); <6> pretty much useless function <7> nodnod philip , not needed in php, the concatenation of strings/arrays is most schweet and push() is just for old farts <3> push(gas.getType("fart")); <3> wait how old am i? <3> yup <3> farts are still funny <6> usually <3> heheh, i figure if i'm psychic enough to figure out how to solve problems for someone like surfdue then i'm allowed to be a little arrogant <7> usually? *peer* outside of some professors off-the-wall project, when would ya need push()? [ erum..other than using it as a general recomendation for newbs to use in order to understand basic array usage ] <3> Kyndig, hahahah! wow i think "usually" was aimed at my fart comment <3> but i could be wrong <2> you never solved it <3> surfdue, hahah oh damn <2> i still have to merge it into a function ::| <2> the part that wasnt in the funtion im trying to put it in <3> merge it into a function? <3> what function do you need to merge it into? <8> array_push($tempstore["data"][$i],$ins_fields["data"][$i][id]) <7> surfdue : solve it yerself bud. array_dump($file) look at the output. Below that, drop you in something like: foreach( $file as $a => $b ) { echo "a is: => $a <br> b is: $b<br>"; if( is_array( $b) ) { foreach( $b as $c => $d ) ...etc Step through your array till you figure out how to access the indexes you're looking for. <8> will this copy id from the end of ins_fields to the end of tempstore <2> look at this http://pastebin.com/661072 <2> it dosnt return anything :| <3> omg <3> wow <3> surfdue, i don't think it's possible to do what you think you need to do <2> your kidding me <2> ive done it before.. <7> surfdue : miss a { in there somewhere? <3> surfdue, also, unfourtunately, i think your understanding of PHP is actually rather bad... no offense... based on the code you just showed me i don't think you really understand what you're doing or trying to do <2> Kyndig, i dont thinkso <3> you might think you know... but one thing is for sure... what you need/want to do hasn't been effectively communicated... at least from my stand point <2> r0xoR, to bad phones arnt invented <2> l;) <7> surfdue : nod, you're just about on-track. Your logic is correct, but your syntatical usage needs work =) <3> heheh, logic is correct? <3> lol <3> he's trying to use a loop to run a return statement multiple times! <2> r0xoR, let me explain again, please understand I want to type $file = fetch("SELECT * FROM files WHERE uid='1'"); and then be able to use the var $file['filename'] OR not just filename all of the fields in the row <2> in one function I know its possible <3> ok <3> "use the var" <3> use it to do what
Return to
#php or Go to some related
logs:
filter-cbc test Ciphertext does not begin with a valid header renice boinc knoppix wg111 #web #web libconfig.pm #sed #perl unable to open sw_single suse #math
|
|