View Single Post
Old 09-17-2021, 08:33 AM  
zijlstravideo
Confirmed User
 
zijlstravideo's Avatar
 
Industry Role:
Join Date: Sep 2013
Location: The Netherlands
Posts: 805
Assuming you are somewhere within the <?php { //your code } ?>, where you are getting data from the selected row. Basically, the code where you get the database data, you can use str_replace.


So, something like this:


{
//your code
$newString = str_replace("cat", "pet", $row['pets']);
// replaces cat with the word pet.
echo $newString; //print output if you want
}

Replace $row['pets'], with the actual variable you are using $row[pet_name] or whatever.


Edit: Nevermind, usek0nr4d's comment instead. It replaces empty values and prints pet as placeholder.
__________________
Contact: email
zijlstravideo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote