...list on a form that uses PHP? Thus far, this is what I have:
$string = array( 'element_7', 'element_8', 'element_10', 'element_11');
$patterns = array ( '/^*/', '/^-/');
$replacements = '<ul><li>' . array( 'element_7', 'element_8', 'element_10', 'element_11') . '</li>
</ul> ';
echo preg_replace($patterns, $replacements, $string);
I'm relatively new to this and tutorials don't seem to be simplifying things. Help!
Also, I keep getting this error:
Warning: preg_replace() [function.preg-replace]: Compilation failed: nothing to repeat at offset 1 in /home/ch133837/www/Form/submit.php on line 124 (last line of aforementioned code)
$string = array( 'element_7', 'element_8', 'element_10', 'element_11');
$patterns = array ( '/^*/', '/^-/');
$replacements = '<ul><li>' . array( 'element_7', 'element_8', 'element_10', 'element_11') . '</li>
</ul> ';
echo preg_replace($patterns, $replacements, $string);
I'm relatively new to this and tutorials don't seem to be simplifying things. Help!
Also, I keep getting this error:
Warning: preg_replace() [function.preg-replace]: Compilation failed: nothing to repeat at offset 1 in /home/ch133837/www/Form/submit.php on line 124 (last line of aforementioned code)