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 update data after insert? [closed]
PHP: Parsing data within multidimensional array
PHP cURL - thread safe?
Function in PHP is not working [closed]
data is not stored in database when follow button is pressed
filtering word digit from number and blocking them
How do I use this code in php
How do I uninstall this buildpack in Heroku?
Regex switch replacement and pattern [duplicate]
Doctrine2 find by value in field array
ajax check user logged in before running script
Uploading database mysql
React/ZMQ/Ratchet - Websocket server response
mysql prepared statement failing silently in a new machine
Text in here doc is not showing in multi line
Export Wordpress page to CSV from front end

Categories

HOME
office365
entity-framework
mpdf
yii
angular-meteor
joomla3.2
mutation-testing
clickable-image
migrate
fbloginview
createjs
synthesis
user-defined-types
google-sites
checkout
bazaar
social-tables
error-logging
weex
channel
window-managers
openbr
autodesk-model-derivative
phpstorm-2016.1
infopath2010
universal
devtools
amazon-kms
nppexec
spinner
cordys-opentext
jslint
forms-authentication
text-decorations
linq.js
windows-store
right-click
optionaldataexception
nuclio
kitura
bit-shift
liteide
rightnow-crm
dredd
rm
brightscript
non-linear-regression
freshdesk
instafeedjs
openerp-6
java-2d
s-function
tablespace
qpixmap
static-methods
ajaxmin
trust
ioctl
wepay
myfaces
servicestack-bsd
helm
msgpack
bjam
mixins
wlanapi
tkx
uno
rebar
cout
relationships
mobile-country-code
incognito-mode
pageviews
meteorite
armv6
postgres-xc
node.js-stream
jacob
html-frames
web-frameworks
days
reentrancy
wiktionary
snackjs
representation
space-partitioning
kohana-auth
eaccelerator
getimagesize
rational-unified-process
dm
google-translator-toolkit
projectpier
rtti

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App