@# 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 34



Comments:

<0> I use $a = 'aaa' . $something; Which I ***ume is faster, I can't speak definitively tho
<1> stestagg: but It doesn't seem to work with indexed array, if I try to echo "Hi $string['hello']"; it doesn't work..
<1> maybe I need to avoid quotes into the key ?
<2> echo "Hi {$string['hello']}"; probably would do
<2> suppaman, that was for you
<1> HowardTheCoward: thanks, I've just removed quotes from the keys and now it works
<1> HowardTheCoward: like "Hi $string[hello]"
<3> that will give you a warning if you code with E_ALL
<1> fyrestrtr: me ?
<3> instead, use "Hi ".$string['hello'];
<3> yes you :)
<1> fyrestrtr: that's exactly what I want to avoid
<4> suppaman: Just use what HowardTheCoward gave you.
<1> ok
<4> I don't like fyrestrtr's way anyways. Unreadable.
<4> fyrestrtr: And no, that won't error.



<3> "Hi $string[hello]" <-- this is wrong, it works, but its wrong.
<4> "Hi $string[hello]" will NOT error, people, stop thinking it will.
<3> Unquoted string literals are constants.
<1> kuja: indeed it doesn't
<4> fyrestrtr: No, but it's in string context.
<5> fyrestrtr: except inside strings
<1> fyrestrtr: even into a string
<2> "Hi ".$string['hello']; is silly :)
<1> ?
<2> 'Hi '.$string['hello'] is better
<4> "Hi " . $string[hello] <-- Bad, "Hi $string[hello]" <-- Doesn't matter.
<1> kuja: so can I go with the latter ?
<4> suppaman: If you want to avoid using {}, then you can just use $string[hello] as long as it's in string context.
<0> kuja: what about "hi $string[break]" ?
<4> stestagg: What about it?
<0> kuja: does PHP read the break as a keyword?
<6> HowardTheCoward hi
<4> stestagg: No, like I said, it's in string context.
<6> <? {$linha3["value"]};?> error
<6> ;/
<6> [Tue Feb 28 11:34:03 2006] [error] PHP Parse error: parse error, unexpected '}' in /home/mantenedor/public_html/wifi/alterarcad.php on line 106
<2> contraventor, hi
<1> ok thanks a lot
<1> bye
<4> contraventor: Because you shouldn't have { and } there.
<1> see you
<6> hmmm
<6> i`m testing kuja
<2> contraventor, and use 'value' instead "value"
<0> contraventor: <?= $linha3['...'];?> <-- is this what you mean?
<2> <? $linha3['value']; ?>
<4> Heh, I suggest you stop using <?/<%/<?=/<%=
<5> $s['break'] = "jisatsu"; echo "Hi $s[break]"; <-- works fine
<0> kuja: why?? Oh I have bad habits because I only do in-house development. sry.
<4> stestagg: Well, because it's likely to be removed.
<0> kuja: :( Code bloat
<7> syntax when your in a foreach loop so you can skip an entry.. if ($key == 'match') ??next??;
<5> myc: continue
<7> thx
<6> stestagg it functioned!
<6> :D
<0> contraventor: according to kuja, you should use: <?php echo($linha3['value']); ?> instead
<8> How do I check if, for example, "." is in a string?
<4> Psi-Jack: php.net/strpos
<8> strpos, That's it. Cool.
<9> phpbb uses int(11) database field type to store time
<9> what time format is this?
<9> it has a name, but i forgot it
<10> hi - how in php would i determine if a file is linked to another file?? and if it is which file it is linked too?
<8> Mahmoud: Unixtime
<9> Psi-Jack, really?
<8> Yes... Really...
<9> how to insert this time into the databse?
<0> Mahmoud: aka timestamp.
<9> shouldn't the database field be 'date and time' then use the now() function?
<0> Mahmoud: MySQL 5 has a data type of timestamp. alternatively just use int
<9> and what php function should i use to put the proper time format in int(11)?
<0> Mahmoud: time()
<11> Mahmoud: Use your DMBS' DATE or DATETIME format.
<4> Heh, if you're using MySQL INTs, then you want INT(10), not INT(11)
<9> DMBS?



<4> DBMS
<11> Erm...yes.
<11> Database Management System
<9> Frixon, i'm writing some scripts to work with phpBB, I must use what works with phpBB
<11> Mahmoud: Hm. OK.
<9> Frixon, they use time() and store it in int(11)
<11> That's...erm...crap :)
<9> :P
<4> Mahmoud: Because they're stupid.
<9> yea..
<4> I haven't seen any PHP devs stupider than the phpBB team.
<9> i think it could be some other time formats
<0> timestamp is good because you know what you're getting.
<12> @($this->mysqli = new mysqli($hostname, $username, $p***word, $database, $port)); <-- is this the 'appropriate' way to supress warnings and errors for this command?
<9> lol
<11> MarthaStewart: Errors are not to be suppressed.
<9> all times stored in the database are 10 e.g. "1131228020"
<13> Hello all, is there an easy way to get the absolute location of a php file?
<12> Frixon: that's not quite what i asked
<9> but thier database is int(11)...
<11> MarthaStewart: I know.
<9> could some one tell me what does this mean? 1131228020?
<12> Frixon: and errors are to be supressed if you wish to use self-constructed elegant error-handling rather than php's internal error handling for individual commands.
<14> Welly: are you looking for it *in* the file you're in?
<14> Welly: if so, __FILE__
<12> Mahmoud: it appears to be a unix timestamp, seconds since epoch
<11> MarthaStewart: But not in that way.
<13> davey, i could do! I just need to know it to set up a configuration for a joomla based site
<4> roflmao
<4> Martha Stewart. That's a kicker
<13> davey, so if i do echo __FILE__; then it'll show?
<12> Frixon: what i'm asking is, if i enclose the entire command in () and i preceed it with an @ symbol will it show an error? i guess i'll try it and see.
<14> Welly: try it and see :)
<13> i'll do that! :D
<13> so it does!
<9> time() generates epoch or unix timestamp?
<12> Mahmoud yes
<0> Mahmoud: they're the same thing
<13> cheers Davey!
<9> stestagg, exactly? why they have different names?
<12> Mahmoud: Unix timestamp == seconds since Unix epoch
<12> Mahmoud: why are "belly" "stomach" and "tummy" different names?
<0> Mahmoud: No, timestamp = number of seconds since epoch (01/01/1970 I think) so the epoch is 0 using timestamps
<0> or +0000000000
<9> i'm lost...
<9> so when I say time().. is it epoch? or unix timestamp?
<12> Mahmoud: epoch == 0. some time back in the 1960s. time() generates a unix timestamp which IS the number of seconds SINCE the epoch.
<9> ok got it..
<9> so they both are the same
<12> what are both the same?
<9> epoch is unix time stamp because both are seconds..
<12> Mahmoud: you are confused. EPOCH IS ZERO. UNIX TIMESTAMP IS SECONDS SINCE THE EPOCH.
<0> the epoch is an event. that happened at 01.01.19??
<9> lol
<9> okay got it
<5> it really doesn't matter all that much. just call it a timestamp and be done with
<9> MarthaStewart, so the start point is called 'epoch'
<12> no kidding
<5> 01 Jan 1970, 01:00:00 <-- epoch
<12> ah, ok
<9> i was told by some guys that epoch is a time format it self.. but now i learnt that it's the start point of unix time
<12> Mahmoud: yes, exactly
<9> thanks :)
<9> what's the equalivent command of time() in perl?
<15> just to throw you off even more, epoch is 1st jan 1970 12:00 midnight UTC. so if you are in EST timezone that's 31st dec 1969 8:00 pm
<9> oh it's the same
<9> time() in php is the same as time() perl
<9> thanks guys.. very usefull help.. i appretiate it =)(
<15> and time() in everything
<12> Mahmoud no problem
<16> hey :) I have zendstudio installed. I run phpinfo and I see "zend debugger.." but I go to 127.0.0.1:998/ZendStudioServer/ and I get a 404. any ideas?
<17> is it possible to take a "snapshot" of a url and send it back out as an image?
<5> mxpxpod: what, like a screenshot?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

M5455 ubuntu
File /usr/bin/yum, line 28, in ? import yummain
#perl
k3b-mp3 kubuntu
rtf php class
WARNING **: Error saving passphrase in keyring.
Package mplayer is not available, but is referred to by another package
yum login screen setup
as a scalar ref as * strict refs * in use
u'\xe0'



Home  |  disclaimer  |  contact  |  submit quotes