I'm having a major problem getting the most minor part of my code to work...
I have a script which searches for bullets (•), the search, etc works (whenever I try anything other then a bullet, like a star for example), and it even works on one of my scripts, but the same exact script with a different name, nope, doesn't work...
I know it's ugly, because it's simplified. Same identical code, different results, one doesn't even find that the bullet exists.
Oh, and here's some debugging information...
[-@- -]# md5sum ****.php
10a2a949abc490464b966c37aa650ecb ****.php
[-@- -]# md5sum test.php
10a2a949abc490464b966c37aa650ecb test.php
So I found the problem, but not that's causing it?
I send • asdsa • asdsa • asdsa through the form, it comes out different on both sides even though the code is completely identical, one adds random tags instead of the bullet, the other one does it right, any ideas?
I just tested in Firefox vs IE, this problem doesn't exist in IE, how ironic. *shakes head*
I have a script which searches for bullets (•), the search, etc works (whenever I try anything other then a bullet, like a star for example), and it even works on one of my scripts, but the same exact script with a different name, nope, doesn't work...
Code:
<?
function make_list($form_input)
{
echo "Making List";
$list_begin = strpos($form_input, "• ");
$form_size = strlen($form_input);
if ($list_begin != FALSE OR substr($form_input, 0, 2) == "• ")
{
$form_input = substr($form_input, 0, $list_begin)."<ul>\n<li>\n\t".substr($form_input, ($list_begin+2), $form_size)."\n</li>\n</ul>";
$form_input = str_replace("• ", "</li>\n<li>\n\t", $form_input);
}
return $form_input;
}
//error_reporting(0);
$form_input = $_POST['content'];
echo "My Input : ".$form_input."<br />";
echo "<br /><br />".make_list($form_input)."<br /><br />";
?>
I know it's ugly, because it's simplified. Same identical code, different results, one doesn't even find that the bullet exists.
Oh, and here's some debugging information...
[-@- -]# md5sum ****.php
10a2a949abc490464b966c37aa650ecb ****.php
[-@- -]# md5sum test.php
10a2a949abc490464b966c37aa650ecb test.php
So I found the problem, but not that's causing it?
I send • asdsa • asdsa • asdsa through the form, it comes out different on both sides even though the code is completely identical, one adds random tags instead of the bullet, the other one does it right, any ideas?
I just tested in Firefox vs IE, this problem doesn't exist in IE, how ironic. *shakes head*