Answer the question
In order to leave comments, you need to log in
How can I remove html tags from the database using php?
wrote a script:
$result = mysql_query("SELECT * FROM dle_post");
$names = [];
while ($row = mysql_fetch_array($result)) {
$names[] = $row['short_story'];
}
$row1 = mysql_num_rows($result);
for ($i = 0; $i <= $row1; $i++) {
$strop = strip_tags($names[$i]);
echo $strop;
$rowok = mysql_query("UPDATE dle_post SET short_story='".$strop."' WHERE short_story='".$names[$i]."'");
}
<p class=\"id1\">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question