Having issue with Assigned Array Keyword
Hi
I'm still having trouble understand arrays since I join Daniweb a few months ago. I thought I got a handle it but it seems I need to practice more and write more arrays correctly.
This the issue I'm having I can't echo the words
<?php
$printer_machine = array("Copier", "Inkjet", "Laser", "Photo");
echo "$printer_machine: " .$printer_machine[3]. "<br>";
$type_machine = array('copier' => "Copier & Multipurpose",
'inkjet' => "Inkjet Printer",
'laser' => "Laser Printer",
'photo' => "Photographic Paper");
echo "$type_machine: " .$type_machine['photo']. "<br>";
?>
Any Suggestions and explanation will help. I appreciate it. Thanks!
Related Article: Help me convert xml to php array
is a solved PHP discussion thread by javedshaikm that has 5 replies, was last updated 10 months ago and has been tagged with the keywords: xml, php, array, to.
LastMitch
Industrious Poster
4,118 posts since Mar 2012
Reputation Points: 132
Solved Threads: 334
Skill Endorsements: 45
Eh? Did LM change the post after your suggestion. Either way this post does not make sense. LM - if you did - just a simple thanks would've sufficed. If you didn't, Zagga - you're drunk!
diafol
Keep Smiling
10,630 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57
@Zagga
I made some adjustment and it echo correctly. Thanks!
LastMitch
Industrious Poster
4,118 posts since Mar 2012
Reputation Points: 132
Solved Threads: 334
Skill Endorsements: 45
@diafol
Eh? Did LM change the post after your suggestion. Either way this post does not make sense. LM - if you did - just a simple thanks would've sufficed. If you didn't, Zagga - you're drunk!
I think I didn't check my code! I type this by hand so I didn't pay attention what I did. I felt tired.
But it's solve now! Yes, I did said "Thanks" to Zagga
LastMitch
Industrious Poster
4,118 posts since Mar 2012
Reputation Points: 132
Solved Threads: 334
Skill Endorsements: 45
Question Answered as of 7 Months Ago by
diafol
and
Zagga