I would like to add a column as seen in the image below please (marked up), i would like the column
to be the same thickness as the top section with the title and to have the same colour as the title
section, is this possible please?
Heres the code and i think it needs to be added twice, but once i know what to add and where then i will be
able to do it for the second bit
Notice all the echo’s are gone except the first one. The lines all continue one from that one echo as it doesn’t terminate until the very last line. And you can now see the structure of the table elements. Much easier to read and understand.
If you remove the old fashioned HTML elements and use CSS, it would be even easier to read.
Then you can display the page, use something like FF with WebDev and set the CSS to what you want seeing the changes as you make the changes. Save the resulting CSS that looks okay, and put it in your style sheet.
Try this for starters. It outputs a table like the one you describe. Interestingly I did not realise that you could use the echo command with single quotes to encapsulate the output and therefore keep the double quotes in the html You learn something new every day!
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td height="25" colspan="2" align="center" bgcolor="#3F3F3F"><font color="#CCCCCC">This is your title</font></td>
<td width="25" rowspan="2" bgcolor="#3F3F3F"> </td>
<td width="58" align="center">Your image goes here</td>
<td align="center" bgcolor="#FFFFC6">Snow Risk Title
Day 1 Snow
Day 2 Snow
Thanks Wellington but sadly i do not see how i can use that because the snow risk
script is all automatic, I have been having a play with my exisint code today but i still
cannot get it to add the column
I have actually had another play and managed to acheive what i was wanting by copying
this code from the original script and placing it correctly
Hi Kevin, yes its the WXSim Risk Assessment script, but the snow part that i have on my
front page is what i have modified from the original because i wanted something that would
just show a snow risk and nothing else, i also use the normal script for all risks on my WXSim
I used to have a section on my main page where i used to manually add the snow risk 2 or 3
times daily, but it was a pain having to do this and i wanted something that was automatic
and i was pointed to the script.
I did want it to look like my manually added script but i was not able to modify it to that extreme
so i had to compromise
This is what i used to have, it does look nicer and easier to read at a glance
Looking at you initial post, would I be right in saying the information you wish to include is in the variable: $rsklst[$i]
If so could you add a loop to add the information in the table cell. If you finish the echo after the title then write php add $rsklst[$i]."
"; Once finished continue with a new echo to finish the table