shogemuk
-
Posts
10 -
Joined
-
Last visited
Never
Posts posted by shogemuk
-
-
Hi Fellas,
I am using a query to pull some information from the database that looks something like this
<table>
<tr><td>Animal</td><td>Legs</td></tr>
<tr><td>Dog</td><td>4</td></tr>
<tr><td>Duck</td><td>2</td></tr>
<tr><td>Cat</td><td>4</td></tr>
</table>
1) Is there a way of styling each <tr> with alternate colours after pulling this information from the database
2) Is there a way of dynamically getting information from a row e.g. if I just want to retrieve the amount of legs a duck has
Any help is very much appreciated,
Thanks in advance
-
Its like you read my mind , Thank you again.
-
dragon_sa thank you so much, that has solved my problem. Thanks a lot
-
Hi Guys,
does anyone know how split a text into groups depending on how many words are in the text
e.g
$text = "If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. ";
I want a maximium of 5 words in each group, so the above text will be split as such
$text1 = 'If you are new to';
$text2 = 'PHP and want to get';
$text3 = 'some idea of how it ';
$text4 = 'works, try the introductory tutorial.';
But if I want a maximium of 10 words in each group, so the above text will then be split like this
$text1 = 'If you are new to PHP and want to get';
$text2 = 'some idea of how it works, try the introductory tutorial.';
$text3 = '';
$text4 = '';
Is this possible?
Please any help will be much appreciated thanks
-
Hi does anyone please know how to solve this. Please any help in how to change this functions name in a loop.
function createTemplatedSlide(PHPPowerPoint $objPHPPowerPoint)
{
// Create slide
$slide = $objPHPPowerPoint->createSlide();
// Add background image
$slide->createDrawingShape()
->setName('Background')
->setDescription('Background')
->setPath('./images/realdolmen_bg.jpg')
->setWidth(950)
->setHeight(720)
->setOffsetX(0)
->setOffsetY(0);
// Add logo
$slide->createDrawingShape()
->setName('PHPPowerPoint logo')
->setDescription('PHPPowerPoint logo')
->setPath('./images/phppowerpoint_logo.gif')
->setHeight(40)
->setOffsetX(10)
->setOffsetY(720 - 10 - 40);
// Return slide
return $slide;
}
Thanks again
-
Thanks scootstah for the quick reply.
How would you use either of those functions to change the name of this function in a loop?
function createTemplatedSlide(PHPPowerPoint $objPHPPowerPoint)
{
// Create slide
$slide = $objPHPPowerPoint->createSlide();
// Add background image
$slide->createDrawingShape()
->setName('Background')
->setDescription('Background')
->setPath('./images/realdolmen_bg.jpg')
->setWidth(950)
->setHeight(720)
->setOffsetX(0)
->setOffsetY(0);
// Add logo
$slide->createDrawingShape()
->setName('PHPPowerPoint logo')
->setDescription('PHPPowerPoint logo')
->setPath('./images/phppowerpoint_logo.gif')
->setHeight(40)
->setOffsetX(10)
->setOffsetY(720 - 10 - 40);
// Return slide
return $slide;
}
Thanks again
-
Hi guy,
Does any know how to add a variable value to the name of a function in a loop
e.g.
$i=1; while($qryRowName = mysql_fetch_assoc($qryName)){ $i++; function test$i(){ ***** }
Is this possible?
Please any help will be very much aprreciated
Thanks
}
-
Thanks a lot for the help guys. much appreciated
-
Hi Guys,
I am trying to run the following script but I keep getting the following error Operand should contain 1 column(s)
UPDATE x_orders
SET OrderStatus = 1
WHERE OrderID IN
(
SELECT *
FROM x_orders INNER JOIN
x_payments ON x_orders.OrderID = x_payments.OrderID
WHERE (x_payments.PaymentComplete = 1) AND (x_orders.OrderStatus = 0))
Does anyone have any idea!
Thanks in advanced!!
Find item in HTML Table
in PHP Coding Help
Posted
Hi Xyph,
The reason it's in the database is that it allows the user to create the information using FCK Editor. They have been doing so for over 5 years now so there is a lot of information and it will be easier to do these thing dynamically.