Timeline for Generating responsive image html with php?
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 2, 2022 at 17:05 | history | edited | Your Common Sense | CC BY-SA 4.0 |
deleted 8 characters in body
|
| Aug 2, 2022 at 17:04 | comment | added | Sam Miller | Also, since you came up a more elegant way to add commas, the $srcset .= "{$comma}{$basePath}-{$size}.{$format} {$vw}w"; can be edited down to $srcset .= "{$basePath}-{$size}.{$format} {$vw}w"; | |
| Aug 2, 2022 at 16:57 | comment | added | Sam Miller | Works great. I just had to change "<?php foreach ($image['srcset'] as $row): ?>", in our original answer ("end code"), to your $new array, "<?php foreach $new as $row): ?>. Thanks again. I learnt a lot from your answer. | |
| Aug 2, 2022 at 15:55 | comment | added | Your Common Sense | I already added it, not tested tho | |
| Aug 2, 2022 at 9:25 | history | edited | Your Common Sense | CC BY-SA 4.0 |
added 755 characters in body
|
| Aug 2, 2022 at 3:47 | comment | added | Your Common Sense | Ping me If you don't manage, I'll get you a sketch | |
| Aug 1, 2022 at 17:59 | comment | added | Your Common Sense | Just use your two nested loops but not to generate HTML, but to create a 1-level array. It should be quite the same. | |
| Aug 1, 2022 at 17:01 | vote | accept | Sam Miller | ||
| Aug 1, 2022 at 16:56 | comment | added | Sam Miller | Thanks for your detailed feedback! | |
| Aug 1, 2022 at 16:46 | history | answered | Your Common Sense | CC BY-SA 4.0 |