dennismonsewicz Posted October 28, 2008 Share Posted October 28, 2008 I have this array: $myArr=array("<b>Id</b>","<b>Project</b>","<b>Project Id</b>","<b>PM</b>","<b>Designer</b>","<b>PM</b>","<b>Writer</b>","<b>PM</b>","<b>Designer</b>","<b>PM</b>","<b>Christine</b>","<b>PM</b>","<b>Designer</b>", "<b>PM</b>","<b>Julie</b>","<b>PM</b>","<b>Designer</b>","<b>PM</b>","<b>Proofreading</b>","<b>PM</b>","<b>Layne</b>","<b>PM</b>","<b>Programming</b>","<b>PM</b>","<b>Testing</b>"); How do i go about going through each item in the array and making it bold without having to place the <b></b> tags in the array? Link to comment https://forums.phpfreaks.com/topic/130425-array-question/ Share on other sites More sharing options...
rhodesa Posted October 28, 2008 Share Posted October 28, 2008 i'm confused? the <b> tags ARE in the array already? Link to comment https://forums.phpfreaks.com/topic/130425-array-question/#findComment-676569 Share on other sites More sharing options...
.josh Posted October 28, 2008 Share Posted October 28, 2008 assuming you want to remove the bold tags... $array = array('a','b','c'); foreach($array as $val) { echo "<b>$val</b>"; } Link to comment https://forums.phpfreaks.com/topic/130425-array-question/#findComment-676573 Share on other sites More sharing options...
GKWelding Posted October 28, 2008 Share Posted October 28, 2008 <?php $array=array("Id","Project","Project Id"); foreach($array as $value){ $display .= "<b>".$value."</b>"; //optionally add a <br> after </b> to get them on a new line } echo $display; ?> Link to comment https://forums.phpfreaks.com/topic/130425-array-question/#findComment-676574 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.