Jump to content

jaunty_mellifluous

Members
  • Posts

    15
  • Joined

  • Last visited

About jaunty_mellifluous

  • Birthday 12/11/1983

Contact Methods

  • Website URL
    http://www.roadsout.com

Profile Information

  • Gender
    Male

jaunty_mellifluous's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When I type in .. mysql -u root I get the error message saying .. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('wouldntyouliketoknow'); I get the error message .... bash: error sintáctico cerca del elemento inesperado `(' Which basically means sintatic error near the unexpected element `(' ... Please assist, ty
  2. Thanks. Yea, that's what I thought about the double underscore. They have a single one in the book I'm using. Must be a typo.
  3. echo "bitches" . "<br />"; class classname { function _contruct($param) { echo "Contructor called with parameter ".$param; } } $a = new classname("First"); $b = new classname("Second"); I'm trying to run this code but it's not giving me any output. Output should be very simple, e.g, Constructor called with parameter First. Please help.
  4. No, I'm just talking about the $ sign in ${$my_var_name} earlier in the program when the dynamic function is called as ${"foo"} it's purpose is to increment foo right. But when $my_var_name is made equals to $foo and when it is called to be incremented we add an additional ${$my_var_name} to it inside the parenthesis. While before with foo we did not do that. So that is what I was asking about, why is that so?
  5. Thanks bro. Kinda hard to grasp. But I'll keep it in mind.
  6. <?php $foo = 5; $too = 7; ${"foo"}++; ${"too"}++; echo $foo; echo '<br />' . $too; $my_var_name = "foo"; ${$my_var_name}++; echo $foo; ?> I understand the part that $my_var_name is going to increment $foo. But I don't understand that when we used ${"foo"} we did not add the $ sign with it. But when we use ${$my_var_name} we have to add another $ sign. why is that?
  7. <?php function getglobal() { global $my_global; echo "The value of \$foobar is '$foobar' <br />"; } $my_global = 20; getglobal(); ?> It's supposed to give the result, But instead when I try it, its giving me So I don't really understand what's happening and why it's not working.
  8. Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of reference_test(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\php\page2.php on line 32 Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of reference_test(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\php\page2.php on line 32 42
  9. thanks buddy .. is count() function only used to count all the elements in an array? Or are there any other uses for it?
  10. Ok it works. I was using it on a page where I had initialised $foo before. hehe.
  11. Hmm, then maybe it's the php settings on program I'm using to run php. I'm using Wamp Server. Any solutions how I can solve this?
  12. This is my first real project. It's over a year old. I'm proud of it. http://www.roadsout.com
  13. I'm fairly new to php, trying to learn it from a book. They've given me some example code to let me understand how arrays are assigned. <?php function assign_key() { return 'd'; } $foo['a'] = 1; $foo['b'] = 2; $foo['c'] = 3; $foo[assign_key()] = 4; /*Assigned the key value 'd' */ ?> This is the Code. But I'm getting "Cannot use a scalar value as an array" errors when I load the page in browser. What does it mean and what's the problem with the code? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.