php


Insert image into html code variable


I have a PHP variable like this:
Ex1:
$data = '<p>This is paragraph.</p>
<p title="not-special">No!</p>
';
Ex2:
$data = '<p>This is paragraph.</p>
<p title="special">Yes!</p>
';
I want to have a php function, that checks whether there's p element with title="special", and if so, insert div element "YAP!".
How can this be done?

Related Links

How to redirect everything after slash to domain before?
Where to verify if password needs a rehash in PHP?
Replace special character from a string in php
Adding PHP Form to SQL Database
PHP code works locally but not on server
Imagick Color Detection Is Not Accurate
Reading a log/csv file and store each value in an array
Validate File Type(Audio/Video) Using Laravel
MySql limit and offset giving wrong result
Laravel 5.2 storing database in DB table
Pagination with bootpag and jquery
delete all associations based on userid in laravel 5.2
foreach JSON array in jquery
Cant connect PHP(XAMPP) to Oracle using OCI8
how can I add one more data on the top of json?
Convert JSON array into an insert query string in php

Categories

HOME
php
office365
libgdx
mod-rewrite
ontouchlistener
qc
message-queue
theano
openlayers-3
tabs
malware
tcp
elisp
capistrano
tfs2010
selection
spring-security-oauth2
amazon-emr
pm2
jodatime
max-msp-jitter
scala-ide
activeadmin
connection-refused
mime-types
channel
jpa-2.1
crud
openbr
epplus
image-optimization
devtools
android-canvas
landscape
ftp-server
identify
llvm-ir
google-now
python-jira
uipickerview
data-uri
ejml
aws-kinesis-firehose
image-registration
visual-format-language
subforms
rustdoc
pbx
cocoa-bindings
eclemma
rails-engines
vaadin4spring
certificate-authority
decidable
highest
unhandled
360-degrees
dynamics-ax-2012-r2
relational-model
ocmockito
createfile
mfmessagecomposeview
git-reset
thruway
usb-flash-drive
windows-taskbar
cloo
rautomation
mp4parser
ember-table
apportable
blobstorage
sly-scroller
dibs
office-app
red-system
wndproc
fitch-proofs
yuidoc
drawimage
server-variables
firefly-mv
office-automation
nosetests
photo-management
servlet-container
git-log
mygeneration
ios-4.2
ppc
datagridcolumn
jvm-bytecode

Resources

Encrypt Message