| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Comments:
<0> Mike|mb: *growl* <1> I have a form with a bunch of submit buttons, each one has a variable name and I need to be able to see which submit button was pressed, so it goes through the possible names to see which one is set <1> I'm sure there's a more elegant way to do this but this is what's working now and I need it done soon hehe <2> Zakabog: thats exactly where id use that :p <1> Hehe <2> well, ive also used it to set "selected" status on certain form inputs based on $_GEt <3> im getting Fatal error: Cl*** entry requested for an object without PHP cl*** in /usr/local/lib/php/PEAR.php on line 863 <3> running pear install x/x <3> pear version 1.4.9 <4> Zakabog: give them all the same name and different values, then you just check that name <0> try #pear <3> Stormchaser i already tryied <0> !+g10 <5> Guideline #10) We don't support script(s). We help you *write* PHP, not recommend or download and install/hack/modify/adapt/use pre-written scripts <0> actually... <0> !+g8
<5> Guideline #8) SQL Q's: #sql, #mysql or #postgresql. Apache Q's: #apache. Linux Q's: Either #yourdistro, #linuxhelp or #linpeople. HTML/CSS/JavaScript Q's: #web. Just because some other channel is 'dead' does NOT mean you can ask here. <2> g8 works better <2> :p <0> Gimp_: *stab* <2> Stormchaser: haha <2> Stormchaser: i was thinking g8 the second he said he already tried. <4> mysyfy: #pear on efnet has a few more people <6> anyone ever use VPS hosting from register fly <7> whats the best way of handing dates in an sql database, using unixtime, date or datetime? <7> bleh wrong channel, sorry <8> is there any freebsd program or port to source format php code? <8> (like fixing my indentation) <9> hey i'm getting an error 'call to a member function createElement() on a non object' on this code: http://igargoyle.com/phptest.txt <9> the line in question is http://igargoyle.com/phptest.txt <9> er $root = $doc->appendChild($node); <9> can someone give me a hand, my code looks correct to me <9> i'm just trying to do a simple php xml dom writing exercise to get used to php's xml dom <1> If there's a nested for loop inside another for loop, how do I exit out of the main loop from the nested one? <10> nym: What is $doc? <9> $doc is new DOMDocument('1.0', 'iso-8859-1'); <11> Zakabog: put a boolean conditional inside the main, set it before exiting from the nested one, test it in the main, if true, exit the main. <4> Zakabog: break 2; <10> nym: No, it's not <1> Oh thanks <10> nym: Read your own code <9> i have another example working <9> it's not? <10> nym: Show me in your code where you created $doc as a DOMDocument instance <9> oh i see <9> bother <9> close but no cigar <9> thanks TML <9> cool, i have a nice xml example now <9> cheers <1> Does anyone see anything wrong with this line? $id = $red_id; <1> Oh <1> Grrrr I see it now, it's supposed to be $ref_id; <1> I just spent 20 minutes trying to figure out why such a simple statement wasn't working <12> Zakabog, that kinda crap get me all the time =) <12> Usually = instead of ==/ <7> I guess i'm doing this wrong? <7> echo "<td align='left'>" . date('jS M y', $row['added']) . "</td>"; <7> as I get 1st Jan lol <12> bullrage, 1st Jan 1970? <7> 1st Jan 70 :D <13> Maybe $row['added'] doesn't contain what you think it does, or what date() expects. <13> Sounds ilke it contains 1. <12> mattmcc, beat me to it. <7> $row['added'] contains 2006-05-21, and this is the first time i'm doing anything with sql dates <13> Yeah, date expects a unix timestamp. <12> bullrage, date() expects a UNIOX timestamp. <12> !timestamp <7> oh, i'll change the data type from DATE to unixtimestamp then <12> http://en.wikipedia.org/wiki/Unix_time <9> Zakabog: those are the most annoying kinds of errors <12> Zakabog, what is helpful in that situation is to turn error reporting full on (error_reporting(E_ALL). Then you will get "undefined variable $red_id" <14> if php has support for mysql I should be able to find mysql in phpinfo(), correct? <13> If the module is loaded, sure. <7> how do i set the database to be in unix timesptamps :s <13> You don't, really. Just use a function to convert it.
<15> can anyone tell me why if i've seted the fetchmode as ***oc some queris work like mysql_num and others link mysql_***oc? <14> mattmcc: the module? :) <13> The mysql extension. <7> I did, the field was set to 'date' data type, and the unix_timestamp() function is set, but it leaves the date at 0000-00-00 <14> mattmcc: how do I see if its loaded or not? <13> tominator: Well, you'll have a mysql section in your phpinfo output. <14> hehe okay <14> so my problem is obviously that I havnt loaded the module ;D <16> What function do you 'close' cl***es with? <17> eml: an object is destructed as soon as there are no more references to it. <17> (i hope this answers your question) <16> rodion, Ok, so there's no function to call, that's ok. <17> in php5, you can implement __destruct in a cl***. that method will be called, when the object is destroyed and can be used for freeing resources, etc. <17> eml: yeah, there's no need to explicitly destroy an object. <16> Good, good. <18> How would I tell if a string matches a regex? <0> kamoricks: Usually you don't get 'false' from the function <18> Stormchaser: Well, which function wouldn't I get false from? <18> Ah, preg_match, cool. <1> What does this mean - Division by zero in settings_func.php on line 137? <1> Line 137 is a } <0> Zakabog: You're dividing something with a 0 <1> But how? <18> Normally with the / sign <0> Zakabog: pastebin the code <18> $replace = $_SERVER['SERVER_NAME'].":8080"; is giving me a: Unexpected ')' at __LINE__ in __FILE__ <18> Which I think is quite odd, because the there is no mismatched paren anywhere in the code. <0> urf? kamoricks: Look a line higher / lower <1> http://pastebin.com/729040 <1> Line 137 is the } all the way on the bottom before the ?> <18> Stormchaser: It's clean everywhere. <18> Stormchaser: I'm as sure as I can get without having it validate its own parens. <1> haha oh that } isn't supposed to be there <1> Wait, yeah it is <1> Grr <0> Zakabog: Hum... It looks okay here... Maybe you send some weird data in? <1> I just saw one of the .'s was a / <1> All my problems are typos hehe <1> Thanks though <18> What should I use to count occorances of a specific string in another? <19> how to extract each value after "," to array... America,Asia,Europe,Special Offer,Other ? <4> CyberMad: explode() <4> kamoricks: substr_count() <19> thanks.. <17> kamoricks: www.php.net/substr_count <20> Does anyone know how to get a hold of the people from php working on Google Summer of Code? <0> schmalls_: IF I were you, I'd post what you want on internals <20> Stormchaser: thanks <19> how do i know.. how many array that contains in $iseng ? $iseng = explode(',',"America,Asia,Europe,Special Offer,Other"); <19> so i can do loop and insert it to array <0> CyberMad: count(0 <0> erk... count() <19> thank you.. it's correct :) <4> if you just need to insert it into an array then use array_merge() <10> Or, if you just want to iterate over it, use foreach() <0> TML: I recolored the pags, so that now the fox people really look like *fox* :) <10> =) <0> wanna see? <0> http://storm.homeunix.org/misc/bts/page11.jpg <0> TML: Well? Is it better now? <10> Stormchaser: I'm not a GUI right now. I'll let you know once I've had a chance to look. <0> TML: oh, okay :( <18> Why does strtoupper(substr($file, 0, 1)) . substr($file, 1, strlen(file)); stop after 5 chars? It really shouldn't, if I get substr. <21> hi, can someone tell me how to turn a number into a string? I have a string packet and I'm doing strlen(packet) but I want the string of that number which is returned. <18> michelp: "".$num. <21> nice, thanks ;) <4> kamoricks: strlen($file) not strlen(file) ;) <4> michelp: it will be turned into a string implicitly if you use it with a function like strlen() <20> michelp: or: (string) $num <4> you very rarely need to make the conversion yourself <18> Oh... Duh. Thanks. <18> Well, it even converted the reserved word to a string based on context. <18> Right now I'm wondering what the string literals are for...
Return to
#php or Go to some related
logs:
lisp nil is not of type real #perl #web #awk v5 thedarkside #css Midget Chef
apt-get openser ubuntu
mplayerplug-in amd64 mplayer-bin #mysql
|
|