Re: how to insert html code with PHP
| From: | tamouse mailing lists | Date: | Thu, 11 Apr 2013 12:18:22 +0000 |
| Subject: | Re: how to insert html code with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320825@lists.php.net to get a copy of this message | ||
On Apr 11, 2013 6:35 AM, "Rafnews" <raf.news@gmail.com> wrote:
>
> Hi,
>
> I would like to insert a piece of HTML code inside several pages.
> all pages are differently named.
>
> i need in each page to find a particular tag, let's say <div
id="#submenu">...</div> (so based on its ID and tagname) and inside it to
insert my PHP/HTML code.
>
> how can i do that ?
I am a little confused. If you want to insert the same bit of code in a php
file, use the include function.
If you need to do same thing across a number of pages, you probably have
found a spot to refactor your code.
If your talking about inserting it in real time in the client's browser,
you want jQuery/AJAX for that, not php.
(php can serve up the HTML in response to an AJAX request, though)
>
> thx.
>
> A.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>