@# 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 22 23 24 25 26 27 28 29 30 31 32 33



Comments:

<0> target="_self" should be it
<0> but i think it defaults to that
<1> one more quick question
<1> how can i fill that in from the url ?
<1> like page.php?var=val&nextvar=nextval
<2> I3ooI3oo, I'm not sure what the question is... but I'm sure the answer has to do w/
<2> $_GET
<1> kewl
<3> can someone help me with using var_dump on specific variables
<3> or rather, specific parts of variables
<3> i have a bunch of data stored as an array in $ins_fields
<3> I want to var_dump only certain items out of this array
<3> but it is returning null every time i try to do it
<4> lorfds: what parts?
<3> NoBeard -- How about I paste to pastebin a var_dump of the array, and then show you my code for pulling out only part of the array?



<4> meh
<5> Fushuing???
<3> ok -- well anyway when i var_dump($ins_fields) everything works fine
<3> and i get this big var_dump with all my values
<5> BigE
<3> when I do var_dump($ins_fields['value']);
<3> I get NULL
<5> BigE, i found a Wc.sh that count all file lines from a directury recursivelly
<3> have also tried var_dump($ins_fields["value"]);
<3> nothing seems to work
<3> i also have a function that relies on this specific syntax, so I am presuming that part of the problem with my function is that it is being fed NULL values
<6> greetings
<4> lorfds: is Ins_fields an array?
<3> yes
<6> I have a question / problem related to the DOM, writing, and spaces. When I use appendChild and then write the XML out, in the text (.xml) file it seems to -always- put the end of the last child node and the start of the new child node on the same line: </event><event> where I want a line return between them </event>\n<event>. neither formatOutput nor preserveWhiteSpace seems to have any effect on that.
<5> i gotta go.. cya guys
<6> lorfds : do a foreach ($ins_fields as $key => $value ) { print " key : '$key' = $value <br>\n";} to verify that your data has the key correctly in it
<3> earth
<3> k
<3> will try it
<3> earth: do I have to replace for loop with foreach, or can foreach run inside of for loop
<3> cause array i am trying to use variables in is inside of a for loop already
<6> well, if I were doing it, I'd probably throw that loop wherever I'm having the weird problem and put an "exit;" or something to stop execution right there
<6> so I didn't have to get a spammage of a zillion results
<6> but, yes, inside the loop
<6> probably you're seeing some problem related to something /after/ or before where you think you are in the logic path, is my guess.
<6> although I dont fully understand your problem
<6> if this were java, I'd tell you to put it into the debugger and walk it through :)
<6> but, in php, usually best to just throw in a lot of print statements :)
<3> earth: this is part of a for loop that does parsing of the $ins_fields data so that it can be inserted into the database properly
<6> and you're expecting there to be a hash-key for 'value' but you're getting a warning/error on that key not existing, right?
<3> im just getting NULL
<3> value is not a key value
<6> "value" is not a key you're looking for?
<3> it is a field that gets entered by the user -- the key value is $i
<7> is there any functional difference with &&/and
<7> && vs and... are they actually different?
<3> earth: let me throw a few things into pastebin for you
<3> it will be easier for me to explain that way
<7> ick
<6> currently php's dom is screwing up my xm
<6> XML.
<8> is there some way i can achieve this with a php array function? i was thinking maybe array_intersect but it's not quite right... i don't want to use a foreach loop: http://pastebin.com/655061
<6> you want an array union function that ignores the keys?
<8> union sounds right...
<8> i can't see array_union though
<3> earth: http://hashphp.org/pastebin.php?pid=6506
<3> at the top is a var_dump of the array
<6> err, did I say union?
<8> yes...
<3> at the bottom is some code from the for loop that i am working with
<9> i have this -> if ( $CurrRec['cert_name'] && file_exists($CurrRec['cert_name']).'.php' ) { } ... but its returning true for files that don't exist, why would that be?
<8> flaccid: you've got the .php outside of the call to file_exists (that may not be the solution to your problem)
<8> earth: so... like, did you mean union? i guess what i'm kind of looking for is array_sync_values
<10> flaccid: FALSE.'php' is true in a boolean context.
<9> dang
<6> lorfds: I am unable to read your code. that array(0) stuff at the top looks like gobbledy gook to me. I don't understand what it does at all.
<9> ur right dools, thanks for that i'm blind
<9> and a bit drunk
<9> cheers TML



<3> one sec I will make it more readable
<8> TML: you're the lord of all that is PHP, how can i achieve this? http://pastebin.com/655061
<6> dools: so what is wrong with array_intersect_***oc ?
<8> array_intersect_***oc returns values where the key and the value are the same
<8> earth: but i want to extract the values from one array into another
<8> ahh, array_combine might do it
<10> dools: array_intersect_key($two, $one)
<10> dools: array_combine won't work. As the documentation says: "Returns FALSE if the number of elements for each array isn't equal"
<3> http://hashphp.org/pastebin.php?pid=6507
<3> earth: i pasted code at top this time
<3> down below is array output, formatted with <pre> so it should be easier to read
<3> array has a lot of extraneous data -- which is what is at the heard to my question
<3> how do i extract certain values from this array
<3> heart of my question is what i meant up above
<10> lorfds: By using the keys
<3> ok -- excuse my ignorance -- i am new to this
<6> $ins_fields['data']['0][fieldId
<6> doh
<10> lorfds: It's not rocket science. You have the structure of the array right in front of you.
<3> i know, but whenever i try to var_dump parts of the array, i get null
<10> As earth tried to say: $ins_fields['data'][0]['fieldId']
<6> $ins_fields['data'][0]['fieldId'] = 31 ...
<6> you might use prrint "<pre>\n"; print_r($Hash); print "</pre>\n"; as an alternative
<6> it is slightly easier to read
<6> except with the correct spelling :)
<10> As a general rule, prefer echo over print
<6> $ins_fields['data'][0]['value'] = "" (blank) ...
<6> sure, so does the documentation :]
<3> yes, but when I have tried var_dump($ins_fields['data'][$i]['value']); I get NULL
<10> lorfds: Then $i isn't 0
<6> and you don't believe it?
<3> again.....kind of new to this so excuse my ignorance
<3> but if var_dump($ins_fields) gives me all that output
<10> lorfds: I have to believe you're over thinking this
<10> You only have values in $ins_fields['data'][0]
<10> If you check $ins_fields['data'][$i]
<10> And $i is anything other than 0
<3> no.....there is a lot more to that array
<10> You're going to get null for everything
<3> i only pasted part of it
<10> lorfds: Well, $ins_fields['data'][$i]['value'] is NULL. The only variable portion of that is $i, so clearly $i is not what you think it is.
<6> well, if it is telling you taht $ins_fields['data'][$i]['value'] is null .. print out $i so you can see which one it is choking on.
<6> man, my typing is just atrocious.
<3> so var_dump($i);
<6> um
<6> echo "i: $i <br>\n";
<6> ?
<6> just ahead of where you're getting the unexpected NULL warning
<6> I think your data just doesn't have as many elements in it as you think it does, that seems like the problem.
<3> earth -- it isnt a warning
<3> this isnt a bug
<6> you're getting to 5 and you have only 4 entries
<3> i am just trying to figure out how to capture parts of this array
<8> TML: wow... that's the only time i've ever seen a php array function go slower than my crummy foreach loop one
<3> earth -- its possible
<6> but, also note the data you pasted has the 'value' key value as ""
<6> which is awfully close to null :]
<3> hmmmm
<3> i really dont understand this crap as well as i should
<6> have you tried using print_r instead of var_dump ?
<6> it might make it easier to read
<3> yeah -- it print_r doesnt always work ive found though
<3> my typing is pretty atrocious today too......
<3> my grammar aint so hot
<11> if I use copy to upload image to server and specify a folder that doesn't exist.. like images/$id/$imagename, is it possible to have it create that directory automatically?
<10> mugger: No
<12> anyone happen to know the length that mysql will make an md5?
<6> TML: you don't happen to know anything about php5 DOM output issues :) ?
<12> or how I configure it?
<3> earth -- ok, so i did what you said, and i am getting i:1, i:2, i:3
<11> TML: would it work if I did mkdir("images/".$id, 0777);?
<11> or is this a bad idea
<6> kaylee: 32 bytes?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#perl
#css
deactivate touchpad udev
ubuntu edgy timetable
#sed
update-alternative gcc ubuntu
slackware restart alsa
openzaurus vs pdaxrom
#css
sql + self-referential table structure



Home  |  disclaimer  |  contact  |  submit quotes