| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) | |
| Senior Member | why isnt it doing it hey i am reading a PHP ebook and it tells me how to change the type of a string..and i m doing what the book says but it keeps saying that the string is A "STRING" rather then a DOUBLE here is the code PHP Code: Quote:
| |
| |
| | #2 (permalink) |
| Buy my domains. | bool settype ( mixed &var, string type ) Set the type of variable var to type. Possibles values of type are: "boolean" (or, since PHP 4.2.0, "bool") "integer" (or, since PHP 4.2.0, "int") "float" (only possible since PHP 4.2.0, for older versions use the deprecated variant "double") "string" "array" "object" "null" (since PHP 4.2.0) Make it a float? I've never heard of double before. It also needs quotes. settype($number2, "float"); Also, I think you need to make it gettype($number2).. you don't have the $. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |