Jump to content

CraigDee

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

CraigDee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Note- I am writing a simple script for my Site which effectivly acts like a 'Frame'. So each element of the page generated is pulled up from a remote/external/different file. So that when you wish to change, the links page, you only change the 'links' file, not every single page to update the Links area. When you want to change the menu, you only change the 'menu' file, not every single page on the Site just to update the Menu bar. Etc Etc. I have to display the current Date in a few of these sections. -Craig
  2. Guys here is a better question for you, I know this is not relevant to the Thread and that this is a PHP Forum, but HTML is obviously crucial to Webpage development with PHP. Is there like a 'Date Stamp' in HTML? So I could have code for example: <b>Todays Date Is $date</b> Is this easily done in HTML? What is the syntax for format etc? -Craig
  3. Yeah, sorry about that. I didnt read your post before I posted that last one. I was trying to save anyone having to respond, so sorry for the stupid question. I am used to running PHP scripts on Servers from Bash SSH or Terminal on the box etc. I still don't understand why \n doesn't work on its own though? Because there is no '\n' in HTML? I just figured PHP would render the '\n' as a HTML equivalent. Sorry again folks. -Craig *Edit - I forgot that <br> is break not new line. Not the best with HTML tags etc, get rusty from lack of use*
  4. Guys I have worked it out. Although I still dont understand totally why \n doesn't make a new line. I need to use the HTML <br> tag. That does work. I guess because the page is embedded in HTML and is rendered within? So obviously any HTML tag used within a PHP output will render as though it was typed in source. I still don't understand though why \n still just doesn't work? I thought it would, as it is a correct syntax? Sorry about wasting your time guys. I will be posting here more often now anyway, so I can hopefully contribute back to the community anyway. Thanks, -Craig
  5. Hey Guys, First Post! Yay I have a problemo, I feel really stupid about having to ask this question. But basically I can't get a new line when I echo output in a script I am writing for my website. Here is the code: echo $newsentry; echo '_______ Read More..'; I tried '\n' I tried using " (double quotes) I have used ' (single quotes) I have positioned the Line Feed '\n' at the begining of an output, and at the end. Neither made any difference. I tried using carriage return '\r' too. Nothing. I haven't coded in PHP for a while, well nothing basic (I know that sounds rediculas but it has been mostly Apps etc, Client Scripts blah blah blah, but I haven't had to echo with a new line for a few years. Probably the last website which I wrote with my friend. So I checked the PHP manual, and I am clearly missing something when I am reading it, I understood it to mean (which as you can see from my code, is what I am currently doing), that you could just somehow type: echo "some string and it carries on to the second line"; However as I first thought, this makes no difference. Could this be a configuration on the Box that hosts this Site?? Sorry for sounding so stupid guys, I appreciate your help. -Craig
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.