The custom Wordpress plugin I installed, responsible for all kind of hotel booking requests, displays a calendar containing the for- and surname of our clients in the Wordpress backend. At first I didn't get the ID of the booked apartment, but now I got that which leads me to the next problem.
Unfortunately only the ID of the booked apartment is displayed in the backend. Is there a way to convert the ID into a predefined string before the page is displayed?
Like 237 » Apartment 4?
I already tried it with a If-condition, but nothings happened.
if ( $arr["Room 1"]["room_type"] == 237 ) {
$bodytag = str_replace($arr["Room 1"]["room_type"], "Apartment 4");
}
echo '<td>#' . $val . ' ' . $booking_meta["first_name"] . ' ' . $booking_meta["last_name"] . ' <span class="wohnung">' . $bodytag . '</a></td>';
I'm very new to PHP and thanks in advance!
Aucun commentaire:
Enregistrer un commentaire