Re: [PHP] how to insert html code with PHP

[email protected] (tamouse mailing lists)
Newsgroups php.general
Message-ID <CAHUC_t_hjevJqpv843MrSzmw3dN0+3isH3TVo-aAO=X=W_kZGA@mail.gmail.com>
On Apr 11, 2013 6:35 AM, "Rafnews" <[email protected]> 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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.