cleary1981 Posted September 11, 2008 Share Posted September 11, 2008 Hi, I have been passing int variables via a url and reading them as follows $myID = (int) $_GET['id']; my problem is I need to read a string. What do I use instead of int? Link to comment https://forums.phpfreaks.com/topic/123734-reading-a-string-when-passed-from-a-url/ Share on other sites More sharing options...
JasonLewis Posted September 11, 2008 Share Posted September 11, 2008 Using the (string) cast. Link to comment https://forums.phpfreaks.com/topic/123734-reading-a-string-when-passed-from-a-url/#findComment-638918 Share on other sites More sharing options...
GingerRobot Posted September 11, 2008 Share Posted September 11, 2008 There's no point in casting a GET variable as a string. If you don't do anything with it, it'll be treated as a string anyway. Link to comment https://forums.phpfreaks.com/topic/123734-reading-a-string-when-passed-from-a-url/#findComment-638958 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.