D
D
danyfir2016-06-17 00:24:55
PHP
danyfir, 2016-06-17 00:24:55

Find and replace class in php. How to implement?

Hello!
In JS there is such a thing as:
$("#id1").addClass("name") (i.e. find an object with id="id1" and add class="name" to it)
Is there the same in php ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2016-06-17
@alsopub

I will offer phpQuery - https://habrahabr.ru/post/69149/
Unless of course I understand the question correctly.

E
Egor Nevedov, 2016-06-17
@Sanitar88

danyfir
If I were you, I would start with a deeper study of the formation of pages in php, as Stalker_RED already wrote . If the task is on fire - well, insert ajax and change through js, for example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question