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



Comments:

<0> then inside the function i build an array of values $name[] = $row['variable'] etc
<1> why?
<0> however, i want to be able to name the $name array in the function
<0> so i p*** via the function call the name of the reutrn array
<0> why, because i need to work with the two arrays
<0> i plan to undertake some maths calcs on them ..
<1> why don't you just do $return = mysql_query("blah"); return $return; ?
<1> then do all your stuff outside of it?
<0> hu?
<0> let me explain
<1> then you can do your $row = function();
<1> or whatever you want to do
<2> o.O
<0> i want to drag out data for a soccer database, first time for the home data, then the away data
<0> then i want to use both arrays to do calcs
<0> but i need the freedom of having different named arrays



<2> calc what?
<0> for example, total goals scored
<2> rusz: Use SQL's SUM
<0> so i compute data form the first query and second query
<0> no, thats not possible without a new query in my db setup
<1> then do another query?
<2> wha?
<0> and i wanted to keep the query down to one and work with the arrays
<2> rusz: You can p*** a join and a sum, and there you go
<0> can i not set the name of the array via a function then?
<0> look, here is the function setup ..
<0> function teamhomeoraway($name,$team,$season,$homeoraway)
<0> here is the call .. teamhomeoraway("variablename",1,$season,"hometeamid");
<0> here is the array ..
<0> $name[] = $row['nofixtureplayed']
<0> etc
<0> all i want to be able to do is set $name[] as "variablename" in the call
<2> !+var vars
<3> var vars is http://php.net/manual/en/language.variables.variable.php, but by using that you probably have an error in your logic... You should use arrays instead (http://php.net/array)
<0> i cannto see why setting $name in the function p*** as "variablename" would cause a fatal error
<0> is there anyway around my problem Stormchaser?
<1> but rusz
<0> yes luu?
<1> you gotta remember about scope as well, you're not gonna get those names, whatever you call them, out of the function without a return $var;
<1> so like I said, do the query in the function and return the results and then outside of the function you can start working with it
<0> i can if i make the array global ?
<4> rusz: Just make the function return the value.
<0> i'm doing that!
<0> but if i cannot "name" the array that is returned, how do i work with them?
<4> rusz: Then why are you p***ing a variable name?
<0> because i want to "name" the array that is reurned
<4> rusz: $variablename = function(...);
<1> $yourDesiredVariableName = function();
<1> www.php.net/tut there's a lot of information about how php works there, also it's functions, I suggest you read it
<0> ok, and what is placed in that variable, the value of the reutrn array?
<4> rusz: If you are uncertain about php basics as this, I would suggest you go read the tutorial, as luu pointed out.
<0> i'm not, it's just i haven't worked with functions a great deal
<4> rusz: Functions are a part of the php basics.
<1> ...? how can you even use php without using functions?
<5> I'm having a little difficulties with matching a certain string using prge_match* - I'm trying to match $ESC\w+ but fail.
<4> rusz: There's no reason trying to explain this to you when there's a fine manual explaining it much better.
<5> http://websvn.esotericsystems.at/filedetails.php?repname=ESC+-+Esoteric+Systems+CMS&path=%2Ftrunk%2Fsrc%2Fparser%2FTemplateParser.cl***.php < the comment above is the file i'm tying to parse
<0> hey guys, lay off the bloody heloo world tuts will ya
<0> no need to take the mick!
<4> rusz: php.net/functions
<0> thks
<0> no i'm there now
<0> i thought you could name an array name via a function, that's all
<4> rusz: good, then read it.
<0> appears you have to return to the variable, fair enough
<0> cheers
<4> rusz: If you need to name the returned variable, there's something seriously wrong with your logic.
<5> lala
<5> Could someone please sell me some clue on php's interpretation of regular expressions?
<4> jMCg: Ouch. :P
<4> jMCg: php.net/pcre
<5> Hmm.. sed tells me I ****.
<5> So there's something wrong with my regex too, not just with PHP's :P
<4> jMCg: What are you trying to do?
<4> jMCg: http://www.php.net/manual/en/reference.pcre.pattern.syntax.php should cover your needs ;)



<6> http://www.mytorrent.ch/board/diebgame.php?userid=922
<4> Stormchaser!
<4> nvm :P
<7> lol
<7> lo :)
<8> lo? hi!
<2> I'm late, I know...
<2> lilo: Can you do something about cazzquvoc?
<4> Luckily it was only 8 lines of spam...
<5> joh, I'm trying to match $ESCHeader, for instance.
<4> jMCg: What is $ESC?
<4> jMCg: (Dollar-sign)ESCHeader or (Contents of variable $ESC)Header?
<5> joh, the former.
<4> jMCg: try something like /\$ESCHeader/?
<5> I did.
<4> jMCg: This in single quotes or double?
<5> joh, now I'm using single quotes
<4> jMCg: then it should work
<5> Heh.. It should (:
<5> Yeah.. *should*
<4> jMCg: If you're using double quotes, you need to escape the $ and the \: "/\\\$ESCHeader/"
<4> jMCg: It works here...
<4> php -r 'var_dump(preg_match("/\\\$ESCHeader/", "\$ESCHeader"));'
<4> returns 1
<5> WTF?
<5> You're got #!! THREE! \\\ !
<5> This is insane.
<4> jMCg: because of the double quotes
<4> preg_match('/\$ESCHeader/', '$ESCHeader')); is equivalent
<5> Uhm.. O_o I just right now found out that $str is not printed.
<9> http://phpfi.com/101711
<9> Any reason why I'm getting a 400?
<9> (It doesn't need to be a pfsockopen())
<9> But that wouldn't affect anything.
<4> nitishp: First of all, you need to quote your constants in define() like so: define('TIMEOUT', 30)
<10> Mind Control Parasites in Half of Human Population! http://science.slashdot.org/article.pl?sid=06/02/12/0738233&from=rss
<9> joh: That didn't fix it :S
<4> nitishp: No, there's something wrong with your HTTP query string.
<9> joh: I can't pinpoint it myself, see anything wrong with that?
<11> hi
<11> question regarding RIP2 md5 authentication
<11> why does the ccnp material say that it uses the first and the last entry for MD5 auth?
<11> I can understand why it takes the first entry for the md5 hash (128bit)
<11> but I don't understand why it needs the last one
<11> if it takes the first and the last entry, it will be 23 entries
<12> nitishp: Host: hostname.tld
<12> nitishp: Nothing else
<11> key-chain in plain text mode only takes the first entry, hence 24 entries for routing updates
<9> Ah.
<9> I think I'll try it with HEAD
<12> ciscostudent: I think you're in the wrong channel.
<11> does any one know why key-chain in md5 mode takes two fiels? (on is the first entry and one is the last)
<12> ciscostudent: This is a channel for PHP
<4> nitishp: You can use fopen-wrappers to make things easier though. Like $fp = fopen("http://example.com/?foo=bar&bleh=blah";);
<11> lol
<11> sorry
<9> TML: Host: hostname.tld + Head: /file" worked.
<11> i thought i'm in cisco
<11> sorry
<12> nitishp: No
<12> nitishp: I mean, that might work, but technically, you're not allowed to send a "Host" header in an HTTP 1.0 request (Host is HTTP 1.1 specific)
<9> TML: It worked with 1.0, but to stay standards compliant I'll change that to 1.1 :)
<13> hi, in PHP is there a way i can control what functions the eval() function will execute?
<12> bina: No
<13> TML: oh right, k thanks
<12> bina: You shouldn't use eval(), though.
<12> !+eval
<3> If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus Lerdorf, BDFL of PHP
<14> amen
<13> hehe oh right.
<15> hrmm, why doesn't this regex work: (INNER){0,1}\s+(JOIN){1,1}\s+(LEFT|RIGHT|FULL){0,1}\s+(OUTER){0,1}(.+) ... INNER is optional, JOIN is mandatory, LEFT/RIGHT/FULL are optional, OUTER is optional. it should match: 'JOIN BLAH' 'INNER JOIN BLAH' 'INNER JOIN LEFT BLAH' etc... but it doesn't match any of them


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#physics
#mysql
deinstall ubuntu-desktop
umount: /mnt/ubuntu: device is busy
#suse
#ai
perl tabstrip
suse10.1+pacman
#linux
#oe



Home  |  disclaimer  |  contact  |  submit quotes