So I have a database that stores First and last names, then echos them back to a website, as of now the entire first and last name echos back (John Smith) I want the last name to just display the last letter and a . (John S.) here's my code for echoing the database
Code: <?PHP
$res = mysql_query("SELECT id, DATE_FORMAT(date, '%M %D %Y') as dt, firstname, lastname, testimonial FROM testimonials ORDER BY date DESC LIMIT 10");
while ($row = mysql_fetch_assoc($res)) {
echo "<p align="right"><i>{$row['firstname']} {$row['lastname']}<br />{$row['dt']}</i></p><br /><br />{$row['testimonial']}<br /><hr width="80%" color="#000000"><br />";
}
?>
Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?After dealing with numerous very well qualified programmers to only turn down the project due to difficulty
Onclick problem in Firefox
Hi, I am using a <label onclick="myfunction(this)"></label>. It doesn't seem to trigger in Firefox but works fine with ie. Does anyone know why?Thanks
Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.So I have a basic template (with headers and footers and stuff) - main.php. The contents are to be inside a table.The
convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javascript array. is this possible? I tried with Json_encode but it doesn't seem to work. is there
unserialize help, getting errors
hi all , I got a form with 6 fields (2 input and 4 select box), when the page loads one block is shown and through javascript all the fields can be copied multiple times so I need to store the data in
Need a Timecode Class...
Not a Time Stamp, Time Code. Format is a bit different. HH:MM:SS:FF where FF is Frames. I dont really care if it is a Drop Frame or Non Drop Frame system, it doesnt need to be that accurate. Just
How to file_get_contents when login required?
Hello!I am trying to read data from a page that you have to be logged into to view, I am trying to use file_get_contents to do this, I have read that I need to use cURL, Is that true?Also, as Another
RadioButtonList data selection
view plaincopy to clipboardprint?<asp:RadioButtonList ID="type" runat="server" TextAlign="left" CssClass="contactTypeRadio"> <asp:ListItem Value="Inquiry" Selected="True" />
header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1 image with a playbutton image on top of ithere is the page that generates the
how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to make a new line before each * Also why does some characters come out all funky?Hers my code.. I dont