Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to concatenate strings in php?

Posted on 2011-03-11
6
Medium Priority
?
259 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 2000 total points
ID: 35113661
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
ID: 35113685
Thanks! Maybe you can help me with my next question.
0
 
LVL 16

Expert Comment

by:sjklein42
ID: 35113700
Post it as a "related question" (or link to it here) and I'll take a look.  Thanks.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

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

Expert Comment

by:sjklein42
ID: 35113719
no prob.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

926 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