確定以明確病舉一個例子有沒有PHP函數來查找中間字符串?
$email = '[email protected]';
$domain = strstr($email, '@');
echo $domain; // prints @example.com
$user = strstr($email, '@', true); // As of PHP 5.3.0
echo $user; // prints name
,因爲它說,它之前打印什麼「@」用真實的,空白打印接下來@
即時尋找一個功能打印@本身給它2串並搶他們之間有什麼
這樣
$string= 'someXthing';
$tograb = phpfunction("some","thing");
echo $tograb; // should be printing X
^這並不工作,我只是寫我噸至講解
我真的很想看到一個你可以使用它的情況。此外,只需使用正則表達式 – Ibu 2012-04-13 17:38:39
你需要的是一個正則表達式 – 2012-04-13 17:39:41
檢查這個線程http://stackoverflow.com/questions/1445506/get-content-between-two-strings-php – 2012-04-13 17:40:46