• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

QUESTION Display a complex link coming from database

RobertS

New member
Messages
5
Likes
0
Points
1
#1
The appetite comes with the food...
I'm trying to display a table with data comming from a database. That work quite well, i.e. displaying a table with colums like: date, event, address.
All the datas coming from a databse view with many "concat" colums, like address is a concat from street, postaal code and city.

Now I've tried to display the adress-data as alink with a GoogleMap route information behind.
The colum in the database looks like this example:
Code:
<a href="https://maps.google.de/maps?saddr=Kölnstraße+313,+53117+Bonn,+Germany&daddr=Sankt-Josefs-Platz 8+52068+Aachen&t=h&om=0" target="_blank" rel="noopener">52068 Aachen, Sankt-Josefs-Platz 8</a>
In a "normal" website the link works quite well and opens in a new tab as expected.
Using that database field inside Woody Snippets just "Array" gets displayed.

The line inside the code is:
PHP:
echo $row["Datum"]." ". $row["Veranstaltung"]." ". $row["Schwimmbad"]." ".["Adresse"]."<br>";
Where the first three fields are working well, the "Adress" field is substituted by "Array".
 
Last edited:

Temyk

Support team
Staff member
Messages
326
Likes
20
Points
18
#2
Hello.

You forgot to specify $row
PHP:
echo $row["Datum"]." ". $row["Veranstaltung"]." ". $row["Schwimmbad"]." ".$row["Adresse"]."<br>";