title: Array and substring php
body: <pre><code>     //array data                          
     {
      $results[] = $result;
  
      $SiteID=$result["site_id"];
      $pay_sale_id=$result["pay_sale_id"];
      $pay_payment_info=$result["pay_payment_info"];
      $payNo= substring_index(substring_index('$result["pay_payment_info"]', '$USER=', -1), '~$TAGROLE', 1);
  
   }
  </code></pre>
  
  <p>The  content of pay_payment_info is as follows  </p>
  
  <pre><code>#$TAG=6F0000173~$USER=james~$TAGROLE=0
  </code></pre>
  
  <p>I want to extract only the user info, but i get error:</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined function substring_index() in line</p>
  </blockquote>