User Tools

Site Tools


en:web_development:media:named_arrays

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:web_development:media:named_arrays [2022/05/03 06:24]
mag [Foreach]
en:web_development:media:named_arrays [2023/08/16 09:33] (current)
Line 181: Line 181:
     $animals['item3'] = 'rabbit';</code>     $animals['item3'] = 'rabbit';</code>
   * We can read the array in the same way. Add this code to the <html><main></html> tag.   * We can read the array in the same way. Add this code to the <html><main></html> tag.
-<code>    echo "MURRAY: the first photo is $photos['Photo 1'].";</code>+<code>    echo "MURRAY: the first photo is {$photos['Photo 1']}.";</code>
   * Now view the page and check the results.   * Now view the page and check the results.
  
en/web_development/media/named_arrays.1651584285.txt.gz · Last modified: 2023/08/16 09:33 (external edit)