Thread: String to Int
View Single Post
# 2 29-03-2006 , 09:23 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
you're talking about casting.

you can cast a string like this:

string $strVal = "150000";
int $intVal = (int)$strVal;
float $floatVal = (float)$strVal;


and you can go the other way too:

int $intVal = 1545;
string $strVal = (string)$intVal;

user added image
A


Technical Director - Framestore

Currently working on: Your Highness

IMDB