programAngel
-
Posts
14 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by programAngel
-
-
Hi,I had a job interview and they asked me about regular expression, I knew most most of the question. However they asked how can I define regular expression that will accept every string that contain equal number of the letter 'a' and 'b', regardless of the other chars.I mean string like:aaabbb (3 - 'a' , a - 'b')afffhgflhgfladflgkdflbdfdsfdsb (2 - 'a', 2 - 'b')avvvbbdda (2 - 'a', 2 - 'b') I told them I know how to create function that will just count the number of 'a' and 'b' and then equate them.but my question is, can I solve it with regular expression and how?
-
Hi,something confusing me regard the http_get, lets say I want to do the following request:http://example.com?user=bob&password=passwordshould it look like?:Code:$result=http_get("http://www.example.com/", array("user"=>"bob","password"=>"password"), $info);or like:Code:$result=http_get("http://example.com?user=bob&password=password", , $info);I have read the manual:http://php.net/manual/en/function.http-get.php but I am still not sure what the options mean.
static declaration in given parameter
in PHP
Posted · Edited by programAngel
in the following post, I have the code:
in one of the line it call a function and declare a parameter as static.
what is the meaning of the static before the name of the parameter, I mean what is the defirrent their code in line 14 and the following code:$photo->setDB($db); because I don't understand what is the meaning of saying somethign is static when you give it as parameter.