Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP inside <script>

Posted on 2006-11-23
2
Medium Priority
?
1,103 Views
Last Modified: 2008-01-09
Hi,

Please assist how can we insert the number of rows returned from mysql into the varaiable myCells.

Thanks.

<script>
var myCells = [
["Test1","Ok"],
["Test2","<?PHP echo mysq_row_count($datasetTest); ?>"]   <-----------error
];

.....

</script>
0
Comment
Question by:FrankPorter
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 18002621
><-----------error
what error?

now:
>mysq_row_count
looks like you have a typo, ie a "l" missing:
mysql_row_count

if that doesn't help, can you show the code that created the $datasetTest?
possibly, the query is not correct.
0
 

Author Comment

by:FrankPorter
ID: 18002857
should be mysql_num_rows
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question