Page 1 of 1
how to modify text from within a php script.
Posted: Sat Mar 11, 2006 7:18 am
by 5leander5
Can someone please tell me how to modify text from within a php script.
For instance, how can I make the following text centred and red
Code: Select all
<?php
echo "how can i make this red and centred?";
?>
Re: how to modify text from within a php script.
Posted: Sat Mar 11, 2006 7:40 am
by neophyte
You don't use PHP to change the color, use CSS...
Posted: Sat Mar 11, 2006 8:05 am
by shiznatix
or simple html. <center><font color="red">

Posted: Sat Mar 11, 2006 8:36 am
by 5leander5
I've setup some CSS styles but cannot applt them to my php scripts. How do you do this? For instance, how can I apply one of my style sheets to the following code?
Code: Select all
<?php
session_start();
ob_start();?>
<html>
<head>
<title>Expression Of Interest</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style3 {color: #FF0000; font-size: 10px; }
-->
</style>
<link href="bert2.css" rel="stylesheet" type="text/css">
</head>
<?php
if(isset($_SESSION['Submit'])){
echo "Please complete the mandatory fileds. Thank you.";
}
?>
?>
Posted: Sat Mar 11, 2006 8:39 am
by s.dot
Code: Select all
echo "<p class=\"style1\">text</p>";
Posted: Sat Mar 11, 2006 10:19 am
by NightFox
Ya, or just:
Code: Select all
echo "<p class='style1'>text</p>";
Code: Select all
echo "<span class='style1'>text</span>";