Re: 2 NEWBIE QUESTIONS
| From: | Yura | Date: | Thu, 23 Aug 2001 16:02:11 +0000 |
| Subject: | Re: 2 NEWBIE QUESTIONS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64120@lists.php.net to get a copy of this message | ||
On 23 Aug 2001, at 0:16, Georgie wrote:
> 1) Is there any PHP command that'll convert a MySQL database timestamp into
> a format that humans can read?!! For example, I want to change
> "20010822001245" into "00:12.45 on the 22-08-2001"?
I believe all previous replies on this qwestion were good for you;
> 2) This is the hard question. I have a script that gets values from a
> database and then includes a php page which contains "echo $variable" code
> to get the values from the database onto the page.
>
> What I want to do is have the PHP page code in the main script instead of
> being included externally. So i tried putting the code into a variable and
> then including, but it didnt work. Then I tried echoing the variable but the
> PHP code isnt executed.
Try to copy everything that is in your included php page except for
"<?php" and "?>" other words everything that is between
"<?php"
and "?>" and replace your "include()" statement in the main script
with what you just copied. But I don't really understand why do you
want to put it in the main script, I would rather live it outside.
Youri
<>< <>< <>< <>< God is our provider ><> ><>
><> ><>
http://www.body-builders.org