Can't find my string in target using strpos
<p>$cartArray structure:</p>

<pre><code>Array ( [0] =&gt; 1. X =&gt; 2. Y [2] =&gt; 3. Z [3] =&gt; 4. XX [4] =&gt; 5. YY [5] =&gt; ) 
</code></pre>

<p>$list:</p>

<pre><code>$list = array(
    "1.",
    "2.",
    "3.",
    "4.",
    "5."
);
</code></pre>

<p>Function</p>

<pre><code>function alignNum($cartArray, $list)
{
   foreach($cartArray as $cA)
   {
      echo "&lt;br /&gt;" . $cA . "&lt;br /&gt;&lt;br /&gt;";
      foreach($list as $l)
      {
            echo $l . "&lt;br /&gt;";
            echo "Type of \$l is " . gettype($l) . " and type of \$cA is " . gettype($cA) . "&lt;br /&gt;";

            $pos = strpos($cA, $l);

            echo "Comparing " . $l . " to " . $cA . "&lt;br /&gt;";

            if ($pos !== true)
            {
                echo "&lt;br /&gt;" . $l . " was not found in " . $cA . "&lt;br /&gt;&lt;br /&gt;";
                continue;
            }
            else
            {
                $post_cA = str_replace("EUR", "EUR&lt;/span&gt;", $cA);

                $new_cA[] = (str_replace($l, substr($l, 0, -4) . "&lt;span style='float: right&gt;'", $cA)) . $post_cA;

                return $new_cA;
            }


          }
      }
}

$new_cart = alignNum($cart, $list);
</code></pre>

<p>So, I keep getting my custom debug message: "X was not found in Y". I.e it's not founding it X in ANY of the provided strings.</p>

<p>It's not a question of types either. Both are strings.</p>

<p>Any ideas?</p>

<p>EDIT: Also, note that I've censored some stuff out, since this is business related code.</p>
