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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -