title: preg_match_all() into variable for each?
body: <p>Hi How can I get the echo $row2 into one variabel for each $row2?</p>
  
  <p>There will be 5 matches for $day $row, each one containing 3-6 $ratt as $row2.</p>
  
  <p>How can I get each $ratt[1] to a variable like</p>
  
  <pre><code>$day1 = "...|...|...|...|...|...";
  $day2 = "...|...|...|...|...|...";
  $day3 = "...|...|...|...|...|...";
  $day4 = "...|...|...|...|...|...";
  $day5 = "...|...|...|...|...|...";
  
  
  preg_match_all('/&lt;div id=\"lunchmenyspaltrubrik\"&gt;(.*)&lt;\/div&gt;.*&lt;ul&gt;(.*)&lt;\/ul&gt;/Us', $contents, $dag, PREG_SET_ORDER);
  
  foreach ($day as $row ) {
     preg_match_all('/&lt;div id=\"nyheterspaltbrod\"&gt;(.*?)&lt;\/div&gt;/', $row[2], $ratt);
     foreach ($ratt[1] as $row2 ) {
        echo $row2.'&lt;br&gt;';
     }
  } 
  </code></pre>