PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Tue Feb 03, 2004 4:52 am
i have a string like this : "12354.123"
and i want to convet it to a float value!
how do i do that?
thanks in advance
peleg
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Tue Feb 03, 2004 6:39 am
Code: Select all
<?php
$variable = '122.34343';
$variable = (float)$variable;
?>
Mark
pelegk2
Forum Regular
Posts: 633 Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:
Post
by pelegk2 » Tue Feb 03, 2004 7:18 am
thanks alot:)
but how do i do the same but from float to string?