| |
| |
| |
|
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
Comments:
<0> can you p*** an array with GET? <0> jiggster, yeah <1> http://joshstmarie.com/ <2> jiggster: Don't got IE <3> foreach($_GET['lcn'] as $value) { ... } <1> image supposed to be on the top, content on the bottom left, title on the bottom right :P <1> kuja: don't blame ya, lol <3> IOscanner: But *do* read up on how for() loops work, your syntax is fundamentally flawed <4> ioscanner: for(setup; test; iterate) {} <0> jiggster, http://tmpvar.com/ie-6.jpg <4> see the relevant section of the manual. <2> jiggster: Wine didn't come with the basic DLL's, at all. Something wrong with Wine in the Ubuntu repository <1> tmp thanks <0> np <1> kuja oh that ****s <4> but yes, a foreach is usually the better construct to use.
<5> I need the sub var $_GET['lcn'][$i] not lcn lcn has many sub variables that is what I need to know. <3> Then why are you incrementing $i? <5> Here is what I had at the start or($i=1;array_key_exists($i,$_GET[lcn]);$i++){ <4> one thing I noticed earlier today with foreach().. can someone else confirm this behavior?: <5> it just stops if 1 is not in the variable <1> hmmm tmp honey... does it look any different now :\ <3> IOscanner: You want each of the elements in the $_GET['lcn'] array, correct? <0> how in the hell do you p*** an array via $_GET ? <5> Yes <1> last request i promise <3> Then use the foreach() loop I gave you <0> yes'm jiggster <1> better or worse? :p <2> IOscanner: Also, don't say [lcn], use ['lcn'] or ["lcn"]. Always quote strings. <4> if I foreach($arr as $k => &$v){}, and then foreach($arr as $k => $v) again later, all the values in $arr get replaced. <0> jiggster, same file on tmpvar <1> awesome <6> what is two periods called? Three is an ellipsis. <2> dot dot? <4> it worked correctly if I unset($v) in between <1> that's how it's supposed to be (i know god awful) <1> lol thanks tmp! <0> jiggster, not a problem ;) <2> groundup: Two periods aren't usually used for anything, I believe. <0> im bored and alone .. so ask away <4> groundup: in some languages, it's the range operator. <3> DShadow: unset($v); won't remove the element from the array, nor should it <7> Pollita: it's not supposed to. <3> I know... <7> that's not what I'm complaining about <3> But it's sounding like you don't. <3> Then what are you complaining about? <0> WOW. <7> the array is being trashed. <2> TML: My buddy is gone! php-bot, he's GONE! :O :O <2> *cries* <7> gimme a minute, gonna write up a test-case. <3> Trashed how? <3> You said all the elements were "replaced".... a word which could have a few meanings out of context <0> DShadow, are you serializing the array data? <8> kuja: We were both on a server that appears to have split <2> :( <2> php-bot: YAY!! <2> php-bot: botsnack <5> that go it. so I didn't need to count the array. just pull $i from sub of lcn then do foreach. <5> Thanks <5> I was making it harder then it should have been <3> You shouldn't be using $i at all <9> how I validate one string? <0> ? <3> Sanhux: Tell it it's pretty and that people like it. <2> I am relaxed :O <1> good good <2> Pollita: Arrays are prettier! <8> Pollita: You're all about the fuzzy. Why not give it something useful to do, make it feel important? <1> php <1> oops <2> Just straight up tell it it's ugly, cause it is.
<7> what's this channel's preferred pastebin? <1> php's mutant arrays to the rescue <1> hashphp.org <2> DShadow: I prefer hashphp.org <1> or... pastebin.com i guess <8> DShadow: onlyfouru.pastebin.com <1> either or <7> pollita: http://hashphp.org/pastebin.php?pid=6130 <7> so, something's clearly wonky, if the array is being modified the second time through. <1> i'm not clear on whats being accomplished <3> hah <3> erm huh <3> That looks awfully buggish then <7> yeah <7> i'm filing a bug report now <3> DShadow: What happens if you unset($v); prior to the second foreach? <7> Pollita: it works as expected <3> Okay, so it'll be an easy fix.... I'm a little surprised at the *specific* result though... <7> maybe I'm blind, but,what's the "foreach/arrays are fubar" Type Of Bug? <3> oh wait, no I'm not <3> "Scripting Engine" <1> i need to stop walking in here in the middle of a discussion <10> does if(!isset($_GET)) work ? <10> to check whether there is any paramater p***ed at all? <10> parameter <3> $_GET is always set <3> However it may be empty <3> So just do: if (!$_GET) { ... } <7> man. I'm on a roll. Found a bug in mysql last week. <3> Or perhaps (more strictly correct) if (empty($_GET)) { ... } <11> how do i get variables to get set in an included file? <7> nngh <1> dont worry no insults tonight :p <7> stupid freenode unregistered message blocks <10> Pollita: thanks <11> do I have to p*** them into the file by p***ing it in the path? file.php?var=1 <12> DShadow I AM registered (must be on zelanny again) <1> i say <11> or is there a better way? <1> i swear os x has a memory leak :P <7> Jymmm: I am not <1> 90% ram usage all the time <12> DShadow I am <1> 1024mb of ram too... <1> erm <7> Jymmm: you being registered doesn't help me send you messages <11> anyone? <13> is there an easy way to create an array with key => value pairs from a list like yes => yes, no => no .... but have these vaues stored in a db <13> I know i can do array( 'key' => 'value' ) etc <14> i'm trying to implement pear's log cl***, but i'm having problems with the mail handler... can someone provide some guidance? <13> what in particular is wrong romans5n1 <11> you can do it like $array['key'] = 'value'; <11> psykick that might make it easier to loop through <13> titosanta: I need to store the key => value pairs in a db and retrieve them into an array with key => value pairs <13> I need something like I described above <13> at the moment I'm using a csv list and using explode <13> but I need the key to have a text label not a numeric value <13> eg. $values = "yes, no, maybe"; - explode( ',', $values ); <13> this is what I am doing at the moment <14> i've got a composite log, which contains mail, file and display children... each handles a set of the error constants... i tested the setup with a simple script that generates every type of error... the ones that are set to display, display, the ones set to write to file, do so, but no emails get sent for the other errors... <13> but explode returns a list like [0] => yes [1] => no [2] => maybe <11> loop through $exploded <13> I need a list that looks like this: [yes] => yes [no] => no [maybe] => maybe <15> Psykick, foreach($values as $v)$newvalues[$v]=$v; <11> foreach ($exploded as $value) { $array[$value] = $value;} <11> yeah what mmmmeow said <16> for those who use suphp. any idea where it might be getting the idea that my Vhost is /htdocs? the config file says different and yt... <15> he <17> i'm using phpix, how do i allow users to have their own album....? <13> romans5n1: I'm just taking a look at the pear manual <2> junix-other: That's not something for #php <17> ok....
Return to
#php or Go to some related
logs:
IceTransSocketUNIXConnect
#gentoo module not found hyperion telnet: Unable to connect to remote host: Connection refused ubuntu telnetd #linux gnome_art.rb Segmentation fault ruby ipsec bypass nat iptables #ubuntu #web fedora installing jabberd
|
|