Jump to content

Recommended Posts

i have a piece of text in a variable(which people can edit)

this text needs to be displayed down the page and should stay within the bounderies i set, but it isn't. here are some snippets from my code.

$intro = "Welcome, this is a test of the sites features.Please go to the admin centre to cutomise the site.";

<p class="welcome"><?php echo"$intro"; ?></p>

 

p.welcome
{
color:#000;
font-size:14px;
text-align:center;
margin-left:425px;
margin-top:40px;
width:400px;
border:ridge #0000FF;
}

this is the site, you can see that it isn't working and what it is doing wrong.

http://deanwhitehouse.awardspace.co.uk/home.php

with ********* it does what you see on the page, and if i use words like "thisistext" it does work, why is this??

ok, i tried the wordwrap code, and it doesn't seem to apply wrap to the second line.

 

$intro = "Welcome, this is a test of the sites features.Please go to the admin centre to cutomise the site.TEXTTEXTEXTTEXTTEXTTEXTTEXTTEXTTEXTTEXTTEXTTEXTTEXT";
$welcome = wordwrap($intro, 60, "<br />\n");


<p class="welcome"><?php echo"$welcome"; ?></p>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.