PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
I JUST started learning php and have a very simple question. I honestly tried to look around to find an answer, but can't seem to find one.
Like I said, I am a 100% beginner - so please excuse this simple question!
I am writing a short little code, and all I want is to add line breaks after a printf command. My code looks like this:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am assuming you're running this as a web page, in which case a line break is represented by the html element <br />
Try adding a <br /> tag before the newline characters.
Thank you so much. I am in a browser, but where exactly do I put the <br />? Is it where the \n is now or after the semi-colon? I tried it after the semi-colon and it doesn't seem to work. Can someone show me where exactly to put the <br />?
Don't ask to be spoon-fed, you're not a baby. You've been given plenty of information for you to solve the problem youself, try a few ways and you will find the answer.
Thank you jcart. And bubblenut - i HAD tried it a few ways before i made the second post and nothing was working....nothing....try not to be so mean. this is the last time I'll come to this forum anyway since some people seem to be rude. but thanks to the people who helped.
I'm sorry, that was a bit mean of me. I was trying to encourage you to spend some time solving the problem yourself as the answers stick in the head better when you discover them yourself.