[Solved] in this code i want add popup box link but showing one error inside .. help me [closed]


Try it like this:

$string = substr($string, 0, 500);
$string = substr($string, 0, strrpos($string, ' '));
$string .= '... <a href="#" onclick="showAjaxModal(\'' . base_url() . 'index.php?modal/popup/readmore/' . $row['categories_id'] . '\')">... Read More</a>';

You are missing the single quotes which should wrap the url inside the showAjaxModal function.

1

solved in this code i want add popup box link but showing one error inside .. help me [closed]