Separate data and put them in an array (PHP)
<p>I have a variable called <code>$name</code> and it contains something like this: </p>

<p><code>$name = 'FName_LName_DataX_Number_www.website.com';</code></p>

<p>I want to put all the data before the <code>Number</code> in an array withouth the underscores and the <code>Number</code> value too.</p>

<p>Something like this:</p>

<pre><code>$array[0] = 'Fname Lname DataX';
$array[1] = 'Number';
</code></pre>

<p><code>$name</code> examples:</p>

<pre><code>$name = 'Roberto_Carlos_01_www.website.com';
$name = 'TV_Show_Name_785_www.website.com';
</code></pre>
