I have a simple PHP script that just returns the string "hi" Here's the code:
<?php include "base.php"?>
<?php
echo "hi";
?>
In xCode I get the following:
2014-12-15 10:56:24.048 MyApp[12515:1603] resultString =
hi
For some reason it adds a new line before the string. How can I prevent this new line from being generated? Is it the way I'm encoding the string? Here's my string
NSString *resultsString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
THIS WAY IT WORKS!!
<?php
include "base.php"
echo "hi";
?>