| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Comments:
<0> I encountered an odd XML bug in PHP 5.1 <1> xyphoid: *nod* it is being on the tad frustrating side of things :) <0> 5.1.2 to be exact, anyone had trouble ***embling XML files before? <1> damn. it's not even trying to read the keys. it just fails. wtf? <2> HELP. whats a really geek name starting with L <3> loser? <1> loser. <1> jinx <2> nah a name <3> :) <4> does php have this built-in for file reads ? while(!eof) <2> geeks name starting with L <3> loser. <2> nah <2> what else <1> lamer
<3> loser... loser. <4> linus <5> that's not a suggestion :P <2> Linus <5> I think Wolfpaws is calling you a loser ;) <3> \o/ <2> ok cool Linus <2> wolfpaws can get fkd <2> bye <4> although Mr. Torvaalds wouldn't think so <1> hmmm <1> I hope there isn't a newborn involved in this. <3> I *should* do something about that... <6> Leeroy surely <4> does while(!eof) work in php? <1> he's a famed gardener. <7> pffft who dosen't <6> He was a contemporary of Adam Weishaupt, responsible for adding the eye to the pyramid. <4> if i have a flat file with multiple lines of /path/to/file.ext: description in it, what's the easiest way to separate the two strings into arrays when read ? <3> file() <4> i'd like to be able to read up to the ':', and split the two strings into two separate arrays <8> explode().. <1> hmm. well it's MYSQLI_FETCH_RESOURCE() that's failing. <9> I dont think any of you love funky house as much as i do :D <4> explode forms 1 array of all of the pieces... i need to end with 2 arrays <9> test <8> That's implode. See explode. <4> just read explode on php.net <10> gymsmoke: explode() on ":" would give you an array of two pieces, "/path/to/file.ext" and "description in it" <8> And I quote, "Returns an array of strings". <4> TML: and i need _2_ arrays <10> gymsmoke: It's up to you then to do your further processing on the two pieces to break them up however you wanted. <10> gymsmoke: Just two arrays? OK, then: $array1[] = $explode[0]; $array2[] = $explode[1]; <10> Given $explode = explode(":", $yourstring); <4> TML: that'll work <3> aneurysm: Because you're in channel, that doesn't allow nick changes <4> TML: thanks... that'll do <10> gymsmoke: ....I hope you're kidding. <4> so, does php understand "while (!eof)" ? <10> gymsmoke: Depends. What's "eof"? <9> Wolfpaws: since when?!:O <4> TML: end of file <9> Wolfpaws: i can't move to my alt nick? <11> Is there an equivalent of strstr for arrays? <4> 'C' has eof and eol (end of line) <10> gymsmoke: The symbol "eof" means nothing in PHP, so it depends on what you've defined eof to be. <3> aneurysm: You're not only in ##php, are you? <10> SoulPropagation: What do you mean? <10> Wolfpaws: he is <9> Wolfpaws: i am <9> Wolfpaws: currently <4> TML: ok, so maybe set it up as while ($line = fgets($fh)) ? <8> fgets()? <10> gymsmoke: php.net/feof <3> TML: odd... /whois tml shows only ##php <11> TML: Like, find the first instance of a string in all the items in an array <10> Wolfpaws: ? Not here, it doesn't.
<11> ***uming the array keys are {0,1,2,...} <4> TML: that's the one... thanks <8> feof. Pronounced fii-oof. <10> SoulPropagation: And what would this hypothetical function return? <3> TML: for yourself it shows all the channels... I think that's something with nickserv's secure or something <11> TML: The key of the item that has it <11> TML: I can write the function on my own if I need to; I just wanna know if there is one already <10> SoulPropagation: Perhaps you're looking for php.net/array-search? <9> alright. well ill be back later then. take care all! i suppose i should live up to the nickname and go... [a]way:( <11> tml maybe <11> TML: Yeah! <11> TML: thanks *hug* <12> O_o <13> Well... Works fine with me... <10> Easy, emoticonicus. <12> lol <10> Wolfpaws: That is indeed a bit odd <3> TML: *shrug* <3> oooo....kkkaaay.... <14> i have a function that returns an array, so i list($one, $two) = arrayfunction($whatever);, the arrayfunction() returns 2 strings, but it tells me Notice: Undefined offset: 0, any ideas? <14> (also Undefined offset 1) <14> i guess it's because of the not-indexed array, how can i index it? <3> what strings? <3> Kraig: array_values() <14> ok, thanks <14> it's weird coz in another machine it works with the same code... <14> but with array_values it works, thanks <15> why would array function returning two strings work with list() ? <14> both PHP 4.3 <15> doesn't list break out the values in an array into the $one and $two? <14> errr. php-4.4.2 <14> that's what i read in the tutorial enygma <14> or so i think <4> if (filesize($file) > 0) { $fh = fopen($file, 'r'); while(!feof($file)) ... throws "supplied argument is not a valid stream resource <4> yak! wrong var <15> heh <14> ok, thanks <4> weird... on writing the data to the file, i get 6 empty lines, then all of the data shows up fine... <8> gymsmoke: Are you sending six empty lines? <4> freeone3000: hehe - not that i'm aware of <4> freeone3000: i'll pastebin the code block... <4> freeone3000: pastebin.com/743873 <16> Wil the REAL Davey, please stand up, please stand up <12> lol <12> gymsmoke: The $row variables might be blank <4> Dangermouse: there are 49 rows in the table... there are 49 rows in the flat file <12> gymsmoke: echo $line before you write it.. and print_r($row) <12> But it couldnt possibly be anything anyone suggets so don't bother trying that :) <17> phpmyadmin is acting up on me. Not sure what's up, I've reinstalled a couple of times. In the right pane, I get no tabs, and I can't seem to create tables. What am I doing wrong? <12> Wyleyrabbit: Ask the people who write it <4> Dangermouse: it's dumping the first 6 rows as ""... which would seem to indicate something's wrong with the query, but i'm not sure what <12> Well neither do it :P <12> i* <3> Wyleyrabbit: What are you doing wrong? You're asking in the wrong channel <12> lol <12> having pd.pkg_item_id = '" . $_GET['pkg_id'] . "' is the most important issue :P <4> Dangermouse: hrmm - i'm joining 2 tables together, both have 49 rows... <4> Dangermouse: there's only 1 package id in the tables <12> I don't know SQL that well .. <3> lol <12> lol <12> Jymmm: liar <4> Dangermouse: i'll run the select in mysql and get a count of the physical number of rows it returns <16> Dangermouse: Hey, I'm STILL trying to figure out what LOGIN: does! <12> lol <3> Jymmm: oh, what the heck... Just `man login` <3> :) <16> Wolfpaws Ok, YOU try 'man login' when you're at LOGIN: <12> ahahah.....hahahaha <4> Dangermouse: damn... it returns 49 rows <3> Jymmm: Is that a trick question? :) <4> Dangermouse: wow! but the first 6 rows have the key columns and nothing else...
Return to
#php or Go to some related
logs:
gentoo R300 DRI driver expected DRM +qmail +smtpd +deferral +4.4.1 hashes in perl6 magnet defun cedga crash world of warcraft how to use iwconfig ubuntu centos+gnone install #perl ubuntu hpna network #gaim
|
|