So google has failed me again (a rare thing). What I am trying to do is this:
I have a form that an admin will fill out where they fill out a text area, they separate bulleted text with a " ; " so they would say blah blah; blah blah blah; blah which would make an unordered list with 3 list elements. That's the logic anyways. The issue is trying to output this list... this is what I have so far:
the html (don't worry ill make an external style sheet if i can get this to work):
<ul style='list-style:none;'>
<?php echo $resp3; ?>
</ul>
the php:
$resp1 = "<li> $resp </li>";
echo "1 = " . $resp1 . "";
$resp2 = str_replace('$resp1', ';', ' </li><li> ');
echo "2 = " . $resp2 . "";
$resp3 = substr('$resp2', 0, -4);
echo "3 = " . $resp3 . "";
I'm echoing to test where the failure is, $resp1
works apparently, $resp2
is outputting one bullet, nothing after it and $resp3
is blank. I've tried all sorts of things, it appears $resp3
may not work with a dynamic variable, but str_replace in $resp2
should work from what I've read.