hello so I have this:
<? if(preg_match_all('/\{row\
|\d+,(.*?)
\}/', $dataEMPS, $match)){
$match = $match[1];
foreach($match as $str){
$str = preg_replace('/\|/', ": ", $str);
$str = preg_replace('/,/', "<br/>\n", $str);
echo " $str <br/><br/>\n";
}
}?>
which turns this:
{row|0,employer|Johns Hopkins Hospital,address|Wilmer Eye Institute, Johns Hopkins Hospital, Baltimore 600 North Wolfe Street Baltimore, MD 21287 ,phone|Work (410) 955-5000,supervisor|Sweety
Bonnie,contact|yes,wage|99
pre hour,duties|sitting around,from|Mon Aug 4 00,to|Mon Aug 4 00,reason|I was sitting around},{row|1,employer|Jo
hns Hopkins Hospital,address|Wilmer Eye Institute, Johns Hopkins Hospital, Baltimore 600 North Wolfe Street Baltimore, MD 21287 ,phone|Work (410) 955-5000,supervisor|Sweety
Bonnie,contact|yes,wage|99
pre hour,duties|sitting around,from|Mon Aug 4 00,to|Mon Aug 4 00,reason|I was sitting around},{row|2,employer|Jo
hns Hopkins Hospital,address|Wilmer Eye Institute, Johns Hopkins Hospital, Baltimore 600 North Wolfe Street Baltimore, MD 21287 ,phone|Work (410) 955-5000,supervisor|Sweety
Bonnie,contact|yes,wage|99
pre hour,duties|sitting around,from|Mon Aug 4 00,to|Mon Aug 4 00,reason|I was sitting around}
in to this:
employer: Johns Hopkins Hospital
address: Wilmer Eye Institute
Johns Hopkins Hospital
Baltimore 600 North Wolfe Street Baltimore
MD 21287
phone: Work (410) 955-5000
supervisor: Sweety Bonnie
contact: yes
wage: 99 pre hour
duties: sitting around
from: Mon Aug 4 00
to: Mon Aug 4 00
reason: I was sitting around
employer: Johns Hopkins Hospital
address: Wilmer Eye Institute
Johns Hopkins Hospital
Baltimore 600 North Wolfe Street Baltimore
MD 21287
phone: Work (410) 955-5000
supervisor: Sweety Bonnie
contact: yes
wage: 99 pre hour
duties: sitting around
from: Mon Aug 4 00
to: Mon Aug 4 00
reason: I was sitting around
employer: Johns Hopkins Hospital
address: Wilmer Eye Institute
Johns Hopkins Hospital
Baltimore 600 North Wolfe Street Baltimore
MD 21287
phone: Work (410) 955-5000
supervisor: Sweety Bonnie
contact: yes
wage: 99 pre hour
duties: sitting around
from: Mon Aug 4 00
to: Mon Aug 4 00
reason: I was sitting around
What I want to be able to do is to put <strong> around "employer:" , "reason: " etc but not the stuff after the ':' ... not sure how to break them out to do this... any ideas on this... thank you...
Start Free Trial