PHP Code:
<?php
$item->string = "decimal(6,2)";
$start = strpos($item->string, '(')+1;
$end = strpos($item->string, ',');
$max = substr($item->string, $start, $end);
echo $start."<br>";
echo $end."<br>";
echo $max.
?>
This prints out:
8
9
6,2)
Why doesn't it work? The only time thing I can get it to do is count backwards from the end 1 position, by making $end = -1. Surely I'm missing something here.
So, what am I missing?
MPEDrummer