Solved

How to concatenate strings in php?

Posted on 2011-03-11
6
250 Views
Last Modified: 2012-05-11
Hello, this string is not working for me:

for ($i = 0, $i < 3; $i++)  {
      echo "<img src=\"" . $pictures[$i] . "\" />";
}

Does anyone have any suggestions?
0
Comment
Question by:FairyBusiness
  • 3
  • 3
6 Comments
 
LVL 16

Accepted Solution

by:
sjklein42 earned 500 total points
Comment Utility
The bug is in the for statement.  You have a comma instead of a semi-colon after the $i=0.

0
 

Author Comment

by:FairyBusiness
Comment Utility
Thanks! Maybe you can help me with my next question.
0
 
LVL 16

Expert Comment

by:sjklein42
Comment Utility
Post it as a "related question" (or link to it here) and I'll take a look.  Thanks.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:FairyBusiness
Comment Utility
0
 

Author Comment

by:FairyBusiness
Comment Utility
Ok, nevermind I got it. Another silly mistake!
0
 
LVL 16

Expert Comment

by:sjklein42
Comment Utility
no prob.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now