2013-03-19 97 views
-2
<?php 
$meta_keys = explode(',' stripslashes($row['meta_keys'])); // split into individual keys at commas 

foreach ($meta_keys as $key) // loop through all keys 
{ 
    echo '<a href="#">' . trim($key) . '</a> '; // output each key link remove any leading/trailing spaces as well 
} 

?> 

我認爲它是與我怎麼有括號,但錯誤它給我的是:T_STRING PHP錯誤

解析錯誤:語法錯誤,意外「的stripslashes」(T_STRING)在/ post.php中上線91

和91是:$ meta_keys =爆炸( '' 的stripslashes($行[ 'meta_keys']));

你們知道是什麼嗎?謝謝!

回答

3

你的第一個參數後缺少逗號:

explode(',', stripslashes($row['meta_keys'])); 
相關問題