PHP Programs

Our aim is to connect students from campuses all over Delhi by making them aware of all Technical, Cultural, Management fests, workshops, Seminars organized by every college in Delhi.

Join Us Now

Program 21: Write a PHP program to convert the value of a PHP variable to string.


<!DOCTYPE html>
	<title>PHP Progarms</title>
		$num = 25;       	//$num is an integer 
		$str1 = (string)$num;    //$str1 is a string now

		// Check whether $num and $str1 are equal are not 
		if ($num === $str1)
			echo "They are the same"."\n";
			echo "They are not same"."\n";

If you have any suggestion or found any error in the above program, then do let us know at [email protected] or just comment below.