php-general Digest 2 Jan 2011 16:52:44 -0000 Issue 7112

Topics (messages 310442 through 310449):

Re: Regex for ... genealogical names
        310442 by: Al

Newbie Question
        310443 by: Adolfo Olivera
        310444 by: Joshua Kehn
        310445 by: David Robley
        310446 by: Joshua Kehn
        310447 by: Adolfo Olivera
        310448 by: Joshua Kehn
        310449 by: admin.buskirkgraphics.com

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---


On 1/1/2011 4:46 AM, Lester Caine wrote:
JohnDoeSMITH' or 'John Doe SMITH'

Try this. not tested.

First, which adds spaces as needed. e.g. JohnDoeSMITH > 'John Doe SMITH'

$newName=preg_replace("%(?<=[a-z])([A-Z])", " $1", $name);//Cap following low
case, add space before it

Next, alphas following a cap, lower case them

function lowCase($matches){return strtolower($matches[1]);}

$newName= preg_replace_callback("%(?<=[A-Z])([A-Z])%", "lowCase', $newName);

Sorry don't have time today to test; but, this should get you started.


--- End Message ---
--- Begin Message ---
Hi,
    I'm new for php. Just trying to get my hello  world going on godaddy
hosting. Can't getting to work. I think sintax it's ok. I was understanding
that my shared hosting plan had php installed. Any suggestions. Thanks,

Happy 2011!!

PS: Please, feel free to educate me on how to address the mailing list,
since again, I'm new to php and not a regular user of mailing lists,

--- End Message ---
--- Begin Message ---
On Jan 1, 2011, at 7:36 PM, Adolfo Olivera wrote:

> Hi,
>    I'm new for php. Just trying to get my hello  world going on godaddy
> hosting. Can't getting to work. I think sintax it's ok. I was understanding
> that my shared hosting plan had php installed. Any suggestions. Thanks,
> 
> Happy 2011!!
> 
> PS: Please, feel free to educate me on how to address the mailing list,
> since again, I'm new to php and not a regular user of mailing lists,


Can you post the code that you are using?

It should look something like the following:

<?php echo "Hello World!"; ?>

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com


--- End Message ---
--- Begin Message ---
Joshua Kehn wrote:

> On Jan 1, 2011, at 7:36 PM, Adolfo Olivera wrote:
> 
>> Hi,
>>    I'm new for php. Just trying to get my hello  world going on godaddy
>> hosting. Can't getting to work. I think sintax it's ok. I was
>> understanding that my shared hosting plan had php installed. Any
>> suggestions. Thanks,
>> 
>> Happy 2011!!
>> 
>> PS: Please, feel free to educate me on how to address the mailing list,
>> since again, I'm new to php and not a regular user of mailing lists,
> 
> 
> Can you post the code that you are using?
> 
> It should look something like the following:
> 
> <?php echo "Hello World!"; ?>
> 

And normally would need to be saved as a .php file so the contents will be
handled by php.


Cheers
-- 
David Robley

A fool and his money are my two favourite people.
Today is Boomtime, the 2nd day of Chaos in the YOLD 3177. 


--- End Message ---
--- Begin Message ---
On Jan 1, 2011, at 7:50 PM, David Robley wrote:
> 
> And normally would need to be saved as a .php file so the contents will be
> handled by php.
> 
> 
> Cheers
> -- 
> David Robley
> 
> A fool and his money are my two favourite people.
> Today is Boomtime, the 2nd day of Chaos in the YOLD 3177. 

Save the code as hello.php. Copy it to your root web directory (should be the 
base directory or something called public_html / www when you FTP in) and 
access it from youdomain.com/hello.php

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com


--- End Message ---
--- Begin Message ---
Sorry, here is the code. The .php extension is a requirement? Can't it b
embedded on a .html file?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> <html xmlns="
http://www.w3.org/1999/xhtml";> <head> <meta http-equiv="Content-Type"
content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head> <body> <?php $a = "hello"; $hello ="Hello Everyone"; echo $a; echo
$hello; ?> </body> </html>
On Sat, Jan 1, 2011 at 9:55 PM, Joshua Kehn <josh.k...@gmail.com> wrote:

> On Jan 1, 2011, at 7:50 PM, David Robley wrote:
> >
> > And normally would need to be saved as a .php file so the contents will
> be
> > handled by php.
> >
> >
> > Cheers
> > --
> > David Robley
> >
> > A fool and his money are my two favourite people.
> > Today is Boomtime, the 2nd day of Chaos in the YOLD 3177.
>
> Save the code as hello.php. Copy it to your root web directory (should be
> the base directory or something called public_html / www when you FTP in)
> and access it from youdomain.com/hello.php
>
> Regards,
>
> -Josh
> ____________________________________
> Joshua Kehn | josh.k...@gmail.com
> http://joshuakehn.com
>
>


-- 
Adolfo Olivera
15-3429-9743

--- End Message ---
--- Begin Message ---
On Jan 1, 2011, at 8:37 PM, Adolfo Olivera wrote:

> Sorry, here is the code. The .php extension is a requirement? Can't it b 
> embedded on a .html file?
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> 
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <title>Untitled Document</title>
> 
> </head>
> <body>
> <?php
> $a = "hello";
> $hello ="Hello Everyone";
> echo $a;
> echo $hello;
> ?>
> </body>
> </html>
> 
> On Sat, Jan 1, 2011 at 9:55 PM, Joshua Kehn <josh.k...@gmail.com> wrote:
> On Jan 1, 2011, at 7:50 PM, David Robley wrote:
> >
> > And normally would need to be saved as a .php file so the contents will be
> > handled by php.
> >
> >
> > Cheers
> > --
> > David Robley
> >
> > A fool and his money are my two favourite people.
> > Today is Boomtime, the 2nd day of Chaos in the YOLD 3177.
> 
> Save the code as hello.php. Copy it to your root web directory (should be the 
> base directory or something called public_html / www when you FTP in) and 
> access it from youdomain.com/hello.php
> 
> Regards,
> 
> -Josh
> ____________________________________
> Joshua Kehn | josh.k...@gmail.com
> http://joshuakehn.com
> 


Yes it _can_ be embedded alongside HTML code, but it must have the .php 
extension otherwise it won't be picked up as a PHP file. You could add a 
.htaccess rule to change the processing directive (essentially make every HTML 
file a PHP file) but that would be wasteful if you ever serve straight HTML. 

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com


--- End Message ---
--- Begin Message ---
Add this to your .htaccess file and HTML files will be handled like PHP
files allowing you put PHP in HTML files.

AddType application/x-httpd-php .html


Richard L. Buskirk

-----Original Message-----
From: Adolfo Olivera [mailto:olivera.ado...@gmail.com] 
Sent: Saturday, January 01, 2011 8:38 PM
To: Joshua Kehn
Cc: robl...@aapt.net.au; php-gene...@lists.php.net
Subject: Re: [PHP] Newbie Question

Sorry, here is the code. The .php extension is a requirement? Can't it b
embedded on a .html file?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> <html xmlns="
http://www.w3.org/1999/xhtml";> <head> <meta http-equiv="Content-Type"
content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head> <body> <?php $a = "hello"; $hello ="Hello Everyone"; echo $a; echo
$hello; ?> </body> </html>
On Sat, Jan 1, 2011 at 9:55 PM, Joshua Kehn <josh.k...@gmail.com> wrote:

> On Jan 1, 2011, at 7:50 PM, David Robley wrote:
> >
> > And normally would need to be saved as a .php file so the contents will
> be
> > handled by php.
> >
> >
> > Cheers
> > --
> > David Robley
> >
> > A fool and his money are my two favourite people.
> > Today is Boomtime, the 2nd day of Chaos in the YOLD 3177.
>
> Save the code as hello.php. Copy it to your root web directory (should be
> the base directory or something called public_html / www when you FTP in)
> and access it from youdomain.com/hello.php
>
> Regards,
>
> -Josh
> ____________________________________
> Joshua Kehn | josh.k...@gmail.com
> http://joshuakehn.com
>
>


-- 
Adolfo Olivera
15-3429-9743


--- End Message ---

Reply via email to