php - First value in implode returning different? -
i not sure why first value in array adds <p>
tags, , rest works inside li
tags.
//user posted variable $checks = $_post['personalization_result']; //handling form data , outputting list if(!empty($checks)){ $checkvalues = array_values($checks); $checkstring = implode('<li style="list-style: none;">'.get_post_meta($post->id, '_moon_question', true).'', $checkvalues); } // need filter can parse html in email add_filter('wp_mail_content_type',create_function('', 'return "text/html";')); //e-mailing form data here $sent = wp_mail($to, $subject, $checkstring, $headers);
this works, email sent, reason looks this.
<p>1</p> //this first value should below <li style="list-style: none;">suits1</li> <li style="list-style: none;">suits1</li> <li style="list-style: none;">suits1</li> <li style="list-style: none;">suits0</li> <li style="list-style: none;">suits0</li>
i wish id problem, frankly not sure issue is? feel inside implode
maybe html isnt written in properly?
implode
adding given string between occurences of given array. means, output provided coult not have been generated script have given, because there no </li>
given anywhere.
beside fact, nobody knows, get_post_meta($post->id, '_moon_question', true)
return, looking generate list?
then code go that:
note: first openig , last closing tag needs seperated, implode add in between. therfore "in between string" needs start closing tag, , end opening tag.
echo "<li>".implode("</li><li>", $myarray)."</li>";
Comments
Post a Comment