You cannot pass variable from PHP to Objective c, or to any other client application for that matter,
You will need to create a layer XML or RESTful interface to get that variable
For example you could update your php to the following (simple text, of JSON if you want)
<?php
echo ("Variable:6");
?>
Then in xCode do the following
NSString *strContent = [NSString stringWithContentsOfURL:@"YourUrl/getvariable.php"];
//Then get the var
NSString *strVariable = [strContent substringFromIndex:
[strContent rangeOfString:@":"].location];
This is a simple synchronous text request, if you want you can change it to JSON and to asynchronous