PHP for loop within for loop with different incrimenting values -


i new php , loops apologize if simple solution having trouble racking brain around math this. trying write loop create array 49 items. items have 2 incrimenting values within them. 49 items below:

m1s1t1url m1s1t2url m1s1t3url m1s1t4url m1s1t5url m1s1t6url m1s1t7url m1s2t1url m1s2t2url m1s2t3url m1s2t4url m1s2t5url m1s2t6url m1s2t7url m1s3t1url m1s3t2url m1s3t3url m1s3t4url m1s3t5url m1s3t6url m1s3t7url m1s4t1url m1s4t2url m1s4t3url m1s4t4url m1s4t5url m1s4t6url m1s4t7url m1s5t1url m1s5t2url m1s5t3url m1s5t4url m1s5t5url m1s5t6url m1s5t7url m1s6t1url m1s6t2url m1s6t3url m1s6t4url m1s6t5url m1s6t6url m1s6t7url m1s7t1url m1s7t2url m1s7t3url m1s7t4url m1s7t5url m1s7t6url m1s7t7url 

as can see there 3 numbers in each item. first number constant. second number counts 7 resets 1. third number adds 1 every time second number resets 1. here have below know off on calculations. appreciated.

   ($i = 1; $i < 8; $i = $i + 1) {         ($u = 1; $u < 8; $u = $u + 1) {             $urln[] = 'm1s'.[$u].'t'.[$i].'url';         }     } 

i getting array string error.

<?php ($i = 1; $i < 8; $i++) {     ($u = 1; $u < 8; $u++) {         $urln[] = 'm1s' . $u . 't' . $i . 'url';     } } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -