On Thursday 30 November 2006 18:51, Paul Novitski wrote:
With respect to separating code and markup, you said sometimes there
are reasons not to do so, for example, web services. What are some
of those reasons?
At 11/30/2006 10:57 AM, Sancar Saran wrote:
What about performance ?
Web
At 11/28/2006 05:05 AM, Satyam wrote:
May I invite you to check http://satyam.com.ar/pht/? This is a
project I started some time ago to help me produced HTML in a more
clean and efficient way. Usually, producing good HTML involves
running a sample output through some HTML validator or
At 11/29/2006 01:51 AM, Robin Vickery wrote:
Cubist Porn - very big in certain 'artistic' circles.
What, both eggs on the same side of the sausage?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 11/29/2006 05:13 AM, Satyam wrote:
- Original Message - From: Paul Novitski [EMAIL PROTECTED]
What I find to be a much greater problem is the
human readability of logic code when HTML is
mixed throughout. Your innovation is helpful
here, as you're nearly making HTML tags into
PHP
Hi all. I am building a web app and as part of it advertisers can upload
their ad image and website URL to go with their ad. Is there a good way to
detect whether that site is a porn site via php?
If the sites home page contains the words sex, babes, and a few other
choice words, which I'll
At 11/28/2006 11:57 AM, Rory Browne wrote:
I didn't mean something quite that simple, or as an absolute solution.
I meant something slightly more advanced, but based on that idea.
From a robot point of view, what do you think is the difference
between the php archives and a porn site?
What
At 11/27/2006 11:21 AM, Ross wrote:
$text = $_REQUEST['text_size'];
if ($text) {
echo $text;
}
I send the $text_size variable to the browser with lines like...
a href=? $_SERVER['PHP_SELF']; ??text_size=small class=size1
id=oneA/a
When the page initially loads I get a undefined index
At 11/27/2006 02:11 PM, Ross wrote:
$text_only = isset($_GET['text_only']) ? $_GET['text_only'] : 1;
if ($text_only==1) {
?
a href=?php echo $_SERVER['PHP_SELF'];??text_only=0off/a
// import css here
?
}
else {
?
a href=?php echo $_SERVER['PHP_SELF'];??text_only=1on/a/span
// import css here
At 11/21/2006 03:02 PM, pub wrote:
Is it appropriate to ask your client to add Powered by your company
to the sites you design and maintain?
And when you see Powered by does it mean designed by or maintained
by or both?
'Powered by' sounds like an engine or a fuel, so I imagine it to mean
At 11/16/2006 12:19 PM, Ashley M. Kirchner wrote:
Say I have an array containing ten items, and I want to display
them in a table as follows:
5 4 3 2 1
10 9 8 7 6
What's the best way to loop through that array to do that? My
thinking gets me to create a loop for 5 through 1,
At 11/16/2006 01:56 PM, Dotan Cohen wrote:
$text=preg_replace_callback('/\[([A-Za-z0-9\'.-:underscore:]+)\|([A-Za-z0-9\'.
-:underscore:]+)\]/i' , findLinks, $text);
This regex should match any pair of square brackets, with two bits of
text between them seperated by a pipe, like these:
On Thursday 16 November 2006 01:38, Paul Novitski wrote:
If you need to left-pad with zeroes, PHP comes to the rescue:
http://php.net/str_pad
However, if you're using the regular expression
method then you might not need to pad the
number. You can change the pattern from
At 11/16/2006 08:46 PM, Myron Turner wrote:
The underscore plus alphanumeric are included in \w, so to get a
regex such as you want:
[\w\s\.\-\']+
You should escape the dot because the unescaped dot stands for any
single character, which is why .* stands for any and all
At 11/16/2006 03:19 PM, Dotan Cohen wrote:
However, this function:
$text=preg_replace_callback('/\[([A-Za-z0-9\|\'.-:underscore:]+)\]/i'
, findLinks, $text);
Does what I want it to when there is no space, regardless of whether
or not there is a pipe. It does not replace anything if there is a
At 11/15/2006 02:06 PM, Børge Holen wrote:
Oh this was good.
I added a while loop to insert extra strings 0
in front of the number to add
if the string is less than 5 chars short.
I forgot to mentinon that the string actually could be shorter (just found
out) and the code didn't work with
At 11/14/2006 03:17 PM, Børge Holen wrote:
$number = 123456789
should print as following:
var1: 12345 (and it is this lengt witch varies)
var2: 67
var3: 89.
You can also do this with a regular expression:
$iNumber = '123456789';
$sPattern = '/(\d+)(\d{2})(\d{2})$/';
preg_match($sPattern,
At 11/14/2006 08:00 PM, Ed Lazor wrote:
I'm reading a book on CSS and how you can define different style
sheets for different visitors. I'm wondering how you guys do it.
The book recommends using Javascript functions for identifying the
user's browser and matching them with the corresponding
At 11/13/2006 01:28 AM, Mel wrote:
Could someone please help me figure out how to show some description
(where applicable) at the same time as I show an image, when I click
on a link, without repeating the entire query?
The image and the description are both in the same table in my database.
I
At 11/10/2006 07:09 AM, tedd wrote:
Lastly, I think we all know that non-profit simply means that at
the end of the year you get to roll your profits over to the next
year without incurring taxes on the excess. Nothing more.
Plus, there's no limit or requirements as to the amount/percentage
At 11/4/2006 08:15 PM, John Meyer wrote:
I'm trying to create this encryption method for puzzles (nothing super
secret, just those cryptograms), but this seems to time out, can anybody
point out what I'm doing wrong here:
for ($i=1;$i=26;$i++) {
$normalAlphabet[$i] = chr($i);
At 10/29/2006 01:07 PM, Dotan Cohen wrote:
The purpose of the ^ and the $ is to define the beginning and the
end of a word:
http://il2.php.net/regex
No, actually, ^ and $ define the beginnning end of the entire
expression being searched, not the boundaries of a single
word. Therefore
Paul Novitski wrote:
If you go this route, perhaps you could enclose each member of your
original array in \b word boundary sequences using an array_walk
routine so that you don't have to muddy your original array
declaration statement.
At 10/29/2006 01:54 PM, rich gray wrote:
IIRC
On Oct 29, 2006, at 2:00 PM, Børge Holen wrote:
Would you suggest to use a extra field to hold the table name as
default?
At 10/29/2006 04:16 PM, Ed Lazor wrote:
Definitely not. Review your design. If you need to know which table
data comes from, then perform table specific queries. If
At 10/29/2006 08:04 PM, Ed Lazor wrote:
That seems unreasonably harsh.
I can see what you mean, but don't take it that way. I was trying to
help.
Sorry, Ed, I had intended my reply to be friendly as well. I'm
allergic to smiley-face icons, but I should have tried harder to
convey my
On Thu, 26 Oct 2006 01:04:25 -0700, Paul Novitski wrote:
It's so interesting that some details bug some people and others bug
others. In an expression such as this:
echo 'option value=' . $day . '' . $selected . '' . $day
. '/option';
...I count eight transitions (instances
At 10:23 AM -0700 10/26/06, Paul Novitski wrote:
For a robust general CMS, though, I want a completely unambiguous
demarcation of replacable content.
At 10/27/2006 09:01 AM, tedd wrote:
If you want a completely unambiguous demarcation then use xml with
a defined schema. I don't think you
At 10/25/2006 11:24 PM, Robert Cummings wrote:
Now, the thing that I dislike about heredoc for such small strings is
the switching between heredoc mode and the switching back. It's ugly on
the scale of switching in and out of PHP tags.
It's so interesting that some details bug some people and
At 10/26/2006 08:24 AM, tedd wrote:
At 1:04 AM -0700 10/26/06, Paul Novitski wrote:
My comparable example (but in an HTML context) would look like:
Hello span class=firstNameFIRSTNAME/span,
where the engine replaces the content of the span with the value
from the database based
At 10/26/2006 10:38 AM, [EMAIL PROTECTED] wrote:
what would be better solution to count records in table (e.g., how many
customers have last name 'Smith'):
$query = mysql_query(
SELECT COUNT(*) as NoOfRecords
FROM customers
WHERE last_name =
At 10/26/2006 11:16 AM, [EMAIL PROTECTED] wrote:
Would it be ok to use the same code to check if customer is loged in?
$query = mysql_query(
SELECT COUNT(Username) as NoOfRecords
FROM customers
WHERE Username = '$Username' AND Password =
At 10/25/2006 04:09 PM, Stut wrote:
Dang that's painful!! Try this...
?php
foreach (range(1, 31) as $day)
{
print 'option value='.$day.'';
if ($selected_day_of_month == $day)
print ' selected';
print ''.$day.'/option';
}
?
Ouch! Gnarly mix of
At 10/25/2006 04:09 PM, Stut wrote:
print 'option value='.$day.'';
if ($selected_day_of_month == $day)
print ' selected';
print ''.$day.'/option';
On Wed, 2006-10-25 at 17:35 -0700, Paul Novitski wrote:
print hdDay
At 10/17/2006 12:39 AM, AYSERVE.NET wrote:
Please, I need help on how to to recognise url in a block of text
being retrieved from a database and present it as a link within that text.
Here's an illustration of your problem:
Input:
Text text http://example.com/directory/filename.html#anchor
At 10:31 PM 7/30/2006, weetat wrote:
I have problem when doing usort() when 'country' = '', i would
like to display records where country = '' last. Any ideas how to do that ?
...
$arraytest= array(
array
(
'country' = '',
)
,
array
(
At 05:40 PM 7/30/2006, Peter Lauri wrote:
function cmpcountry($a, $b)
{
$country1 = $a['country'];
$country2 = $b['country'];
if($country1=='') return 1;
else return ($country1 $country2) ? -1 : 1;
}
Good call, Peter; my suggestion was
At 12:22 AM 7/31/2006, Paul Novitski wrote:
I could make that last statement just a bit simpler:
function cmpcountry($a, $b)
{
$country1 = ($a['country'] == '') ? zzz : $a['country'];
$country2 = ($b['country'] == '') ? zzz : $b['country'];
return ($country1
At 01:14 AM 7/31/2006, weetat wrote:
Thanks Paul,
Very weird tried Peter's option, it doesn't work.
Btw , how to sort by ascending ?
Please explain what you mean. The current script DOES sort ascending
by country (except for the blank country fields which are placed at the end):
At 09:59 AM 7/30/2006, Jochen Kaechelin wrote:
How can I call a JavaScript inside php?
You can't literally call client-side JavaScript from server-side PHP
because they're executing at different times and in different
computers. PHP executes on the server then downloads the page to the
At 11:18 PM 7/28/2006, weetat wrote:
I have 2 array which populated from MYSQL as shown below :
My program will update status in the temporary table according to
compare of 2 arrays, for example from 2 array below:
in $temptablearr = there 3 elements
in $currenttablearr = there 2
At 12:20 AM 7/29/2006, Paul Novitski wrote:
You might consider concatenating all the elements in each sub-array
to make the comparison logic simpler, e.g.:
foreach ($currenttablearr as $key = $subarray)
{
$comparisonArray[$key] = explode(_, $subarray
Niels schrieb:
The problem: A function tries to update an existing value, but is only
allowed to write certain bits.
There are 3 variables:
A: the existing value, eg. 10110101
B: what the function wants to write, eg. 01011100
C: which bits the function is allowed to write, eg.
With
At 11:27 AM 7/13/2006, Michael B Allen wrote:
Let's say you have a Buy button that posts a form to a script that
inserts or increments the quantity of a record in a shopping cart
table. So you click Buy and then Checkout. Now if you hit the Back
button it asks the user if they would like to
At 08:11 AM 7/10/2006, Schalk wrote:
I am getting the following error:* Parse error*: parse error,
unexpected $ in
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
on line *69
In my code the last line i.e. ? is marked as line 69
I don't see anything wrong with
At 04:50 PM 7/4/2006, Brian Dunning wrote:
I have the source of a web page stored in $here and I want to set
$this to whatever appears between 'span class=myclass' and '/
span'. Example:
$here contains (amid tons of other stuff): span
class=myclassThis is a statement./span
If you can
At 11:50 PM 6/28/2006, weetat wrote:
I am using PHP 4.3.2 and MYSQL database.
I need to convert the sql query to Adobe PDF format.
Any one have any suggestion how to do this?
I'm enjoying using the PHP class FPDF http://www.fpdf.org/
It's not a one-step conversion utility, it's a PHP
Hey kids,
I thought I was joining a PHP list, not a snarky ego-fest. I assume
most of us are trying to get work done around here and are interested
in programming QA. Please take your squabbles off-list or re-title
them. They're off-topic and a waste of everyone's else's time. Yeah
I've
At 04:38 PM 6/28/2006, Grae Wolfe - PHP wrote:
The first problem is men's names and unmarried women's names... they will
have the same hs_last_name and last_name so I don't want the duplicate
displaying on the page.
The second problem is the entry of the word none by some of the visitors
in
At 07:53 PM 6/11/2006, jekillen wrote:
I force the user to have javascript enabled
Oops.
Unless you're working IT in a penal colony, I suspect that what you
really mean is that you choose to serve broken pages or no content at
all to users who don't have JavaScript enabled, whether by
At 06:44 PM 6/9/2006, jekillen wrote:
...
A script begins with one indexed array (not associative) and one
other indexed array
with the same values in a different order, the final order.
I want to create an interim array and progressively re order the
array until it matches
slot for slot one
weetat wrote:
I have a sql statement below :
UPDATE tbl_chassis_temp SET country = 'Singapore', city
'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40',
I need to remove the last comma from sql text above.
I have tried using substr and rtrim , without any success ?
At 12:37 AM 6/6/2006, Rob W. wrote:
Say I have a variable setting an ip address of 192.168.100.0
I want to be able to remove the last to chr's of that variable ie: .0
What would be my best solution to do that?
If you want the last two characters you can use substr():
[1] $sResult =
At 10:38 AM 6/4/2006, tedd wrote:
for ($i=a; $iz; $i++)
{
echo($i);
}
-- it stops at y
But, if you use --
for ($i=a; $i=z; $i++)
{
echo($i);
}
-- it prints considerably more characters after z than what one
would normally expect -- why is that?
Tedd,
The discussion of PHP
At 06:46 PM 6/6/2006, Rob W. wrote:
if (strstr(192.168.100,192.168.100.10)) {
$inc++;
}
echo $inc;
That returns nothing. What am i still doing wrong?
I would use quotation marks to explicitly type these as strings:
strstr(192.168.100,192.168.100.10)
Paul
--
PHP General Mailing
At 11:03 AM 5/29/2006, [EMAIL PROTECTED] wrote:
Is there anyway to have a pop-up window to ask are you sure? yes /
no in php?
I know you can do it in Javascript, but I'm not sure what's the best way to
implement it in php. I want the page to do nothing if no is pressed.
With all due respect
At 04:38 PM 5/29/2006, Jay Blanchard wrote:
[snip]
However, PHP can download a page with input fields disabled that
includes a div styled to look like a dialog box with a couple of
submit buttons labeled YES NO. Submitting YES will request the
same page from PHP but without the dialog div and
At 05:04 PM 5/29/2006, tedd wrote:
This really isn't any different than a page calling itself, or
another page, where the result looks like a pop-up dialog box.
That's right. Add the dialog form to the markup and position it
absolutely to appear centered a bit down from the top of the
At 06:25 PM 5/29/2006, Jay Blanchard wrote:
[snip]
I'm not aware that PHP can ask a browser to open a second window
without using JavaScript.
What I'm suggesting would LOOK like a second window appearing on top
of the primary window, then going away, when it would actually be a
single page
At 11:37 AM 5/27/2006, tedd wrote:
I'm looking for a recommendation for a good javascript list like
this list is for php -- does anyone have any recommendations?
I've been on the LA Tech javascript list the last few years and find
the quality of discussion usually high (and with much less
At 11:08 AM 5/23/2006, Lester Caine wrote:
I could not believe that double clicking a link would run the link
twice. It just does not make any sense. So I've been round the
browsers. IE does NOT process the link twice how ever I try and
since all the user sites are IE they should be OK.
Moz,
On Tue, 2006-05-23 at 15:01, Paul Novitski wrote:
An additional strategy to make your system more robust is to use
three pages for your form submission:
1) the form itself, which submits to:
2) the script that processes input, which redirects to:
3) the page that displays the results
At 01:50 PM 5/23/2006, Lester Caine wrote:
2) the script that processes input, which redirects to:
Yep that is the one, and it does check if the user already has an
existing ticket, but it does not see the ticket created by the first
click of double click in Moz :(
*THAT* should prevent the
At 06:32 AM 5/22/2006, Jef Sullivan wrote:
$cur_month = date(m);
while ($r = mysql_fetch_array($month_query))
{
$v = $r[m_id];
$out = $r[months];
if( $cur_month = $v )
{
echo(option selected=.$cur_month.
value=.$v..$out./option)
}
At 11:45 PM 5/20/2006, Paul Goepfert wrote:
I have a drop down menu where I have the
months of year as menu items. I want to be able to have the current
month be the selected month. I have tried using the date function as
the way to set the current month as the selected value but it seems
that
At 07:38 PM 5/21/2006, marvin hunkin wrote:
now, when i open the form, it does not set focus to the first form
field which is the user name.
goes to the login button.
why is this?
Marvin,
Although someone else has suggested you use JavaScript to set the
focus on a particular form field, I
At 09:38 PM 5/16/2006, John Meyer wrote:
$sql = INSERT INTO
BOOKS(CopyrightYear,CoverType,DatePurchased,EditionNumber,ISBNNumber,Notes,Pages,Publisher,LOCNumber)
VALUES(\ . $_POST[copyrightyear] . \,\ . $_POST[covertype]
. \,\ . $_POST[datepurchased] . \, .
$_POST[editionnumber] . ,\ .
At 07:40 AM 5/5/2006, Al wrote:
How can I include place holders for variables in a heredoc such
that after the heredoc is declared, I can assign the variables?
Al,
Escape the $'s in your heredoc expression so that the variable names
remain and aren't evaluated, then eval() the whole
At 11:51 AM 5/3/2006, Phillip S. Baker wrote:
I have some articles stored in a MySQL DB.
What I want is if the article is above a certain length in
characters, to page article through a few pages for site readability.
So I would want to print X number of words/characters.
Save the where the
At 07:12 AM 5/4/2006, tedd wrote:
If the text is organized into paragraphs, which I can't imagine it
not being, then the solution can be found in using a combination of
javascript and php.
Javascript can detect the size (height width) of window the user
is currently using and the web site
At 10:41 AM 5/4/2006, Jay Blanchard wrote:
People who use GET requests are lazy.
Lazy?? Jumpin jujubees yer spoilin' fer a fight, boy.
GET can be an extremely useful tool. As a user, with certain
applications, I appreciate being able to tweak the URL manually in
the browser address bar,
At 10:41 AM 5/4/2006, Jay Blanchard wrote:
People who use GET requests are lazy.
Paul Novitski wrote:
Lazy?? Jumpin jujubees yer spoilin' fer a fight, boy.
...
Now go on outside and breath some fresh air, you been workin on that
computer too long.
At 11:54 AM 5/4/2006, John Nichel
At 01:53 PM 5/4/2006, Robert Cummings wrote:
Direct memory access beats secondary helper memory every time.
Autocomplete is an incentive to have a lazy mind. When your brain has a
larger overall picture of available resources, it can formulate better
strategies than when it only has part of the
At 03:24 PM 5/3/2006, Rory Browne wrote:
It's just struck me, that even though I've been using PHP for six years,
Most of my code, has either been integrated into specialised systems, or for
random administrative job, I've got very little in the line of a portfolio.
This is such a great
At 01:06 AM 5/1/2006, Nicolas Verhaeghe wrote:
When I run the Zend debugger, it returns an error telling me it cannot find
a certain include, while when I run the site it works fine.
...
The error I get is:
Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 -
IMHO, vertical aligned brackets can be messy when nesting
relatively-small blocks (and seems to me like a lot of wasted space)
I'm struggling to get my head around this concept of 'wasted space'
with regard to software code. What is it that's getting wasted,
exactly? If we printed
At 10:46 AM 4/29/2006, tedd wrote:
...
I have found it is simply a waste of my time to try to find
profitable common ground. They are concerned with one thing, and one
thing only, and that is how cheap can they get it -- and they seldom
have a clue as to what it is -- but, contrary to their
At 08:03 AM 4/27/2006, tedd wrote:
Forgive me my simplicity, but trying to tie communication between
php with javascript is like trying to get the past and future to
talk to each other -- they exist at different times. Normally, php
is history when js steps on the stage and while js may say a
At 10:33 AM 4/27/2006, tedd wrote:
At 9:18 AM -0700 4/27/06, Paul Novitski wrote:
I believe you're seeing monsters in the closet where there are only
rumpled socks.
I'm not trying to see, or create monsters, I'm just trying to understand.
Sorry, that was my attempt to be light-hearted
At 10:33 AM 4/27/2006, tedd wrote:
Can js cycle reading cookies waiting for something to do while php
crons writing them as needed -- and vise-versa? Is that a viable
method of communication and activation between the two?
At 01:57 PM 4/27/2006, Paul Novitski wrote:
No, because cookie
At 04:39 PM 4/27/2006, tedd wrote:
What I don't get is how php can pass variables to js and cause it to
run at will.
Do you mean the way one function can call another function within the
same program?
It sounds like you're picturing PHP JavaScript executing
continuously simultaneously.
At 06:29 AM 4/24/2006, Philip Thompson wrote:
I think you are too kind. I think my response would have been likes
Jay's... RTFM. However, you went above and beyond. Isn't this
listserv great!! =D
Thanks, Philip. There may or may not be such a thing as stupid
questions but there sure as hell
At 05:30 PM 4/23/2006, Pham Huu Le Quoc Phuc wrote:
I want to get src of image form a $text, I have a below text
$Text = table border=1 cellpadding=3% cellspacing=3% width=100%
trtd width=20%
img align=middle border=0 id=userupload/78/Autumn.jpg
src=userupload/78/Autumn.jpg
At 02:49 AM 4/22/2006, William Stokes wrote:
I have a column in DB that contains this kind of data,
A20,B16,B17C14,C15,D13,D12 etc.
I would like to print this data to a page and sort it ascending by the
letter an descending by the number. Can this be done? Like
A20
B17
B16
C15
C14
D13
D12
At 03:21 AM 4/22/2006, suresh kumar wrote:
I am facing one project in my project .
this is my code:
a=array(0=10,1=10,2=20,3=30,4=30,5=40);
b=array();
b=array_unique($a);
print_r($b);
o/p getting from above code is b[0]=10,b[2]=20,b[3]=30,b[5]=40;
but i want the o/p be
At 03:43 AM 4/22/2006, I wrote:
Then just do a reverse sort on $aTemp and you get:
Z20
Y17
Y16
Then translate the letters back to their original values and you get:
A20
B17
C16
Oops, I made a typo: that final value should have been B16, not
At 03:46 PM 4/20/2006, Chris Kennon wrote:
I'm drafting a function.php
page, which will be included() in the pages in need. How would I pass
a form as an argument of a function?
Unlike client-side JavaScript, server-side PHP doesn't see the
client-side form. All PHP sees are the values of
At 05:14 PM 4/20/2006, Steve wrote:
I'm creating my own Object Oriented PHP Shopping Cart.
I'm confused about the best way to call the functions of the class
given the static nature of the web.
For example, if I have a function addItem($code), how will this be
called from the catalog or
At 03:47 PM 4/18/2006, tedd wrote:
Unfortunately, not all browsers treat an image link in the same
manner. For example, Safari and FireFox treats the link
/images/merged.png as a new image every time. Unfortunately, Opera
and some other browsers cache the first image and every time after
At 04:12 PM 4/18/2006, Richard Lynch wrote:
If however, you want to be sure the browser doesn't cache the image,
because it is dynamic, just add some randomness to the URL.
Technically, that means the browser WILL cache it, but you'll never
use the same URL twice, so you won't really care.
of a different tack altogether:
At 04:06 PM 4/18/2006, Paul Novitski wrote:
I suggest you merge an image with the copyright notice only the
first time it's requested, then save that merged image on the server
and allow it to be cached normally.
Paul
--
PHP General Mailing List (http://www.php.net
At 05:19 PM 4/16/2006, Jay Blanchard wrote:
I have a table of data and I want to display items by two's, i.e.
Item 1 Item 2
Item 3 Item 4
Item 5
Pardon my asking on the eve of your launch, but is a table the most
sensible markup for this data? It looks to me like a one-dimensional
At 12:54 PM 4/14/2006, Bing Du wrote:
Would anybody remind me how this should be achieved?
This returns all the names of the fields.
while( ($f = odbtp_fetch_field( $qry )) ) {
echo $f-name . \n;
}
This returns the query results:
while( ($rec = odbtp_fetch_array($qry)) ) {
At 12:15 PM 4/14/2006, Geoffrey E. Quelch wrote:
even though the string does contain 9 consecutive spaces, only one is ever
printed to the screen with echo, print or printf.
At 01:19 PM 4/14/2006, Satyam wrote:
It is not PHP but HTML. In HTML any 'whitespace character', that
is space, tab
On 4/11/06, Mace Eliason [EMAIL PROTECTED] wrote:
I am not sure why this won't work I am pretty sure I have done it before;
if($error)
{
echo $errorMessage; // for testing error message is
displayed to screen
echoscript language=\JavaScript\alert('$errorMessage');/script;
At 06:54 PM 4/9/2006, bob pilly wrote:
Im trying to store a document template in mysql that has php var
names within it and then find it in the datebase and print it out
with the var names replaced with the var values.
At 04:05 PM 4/7/2006, Paul Novitski wrote:
At 02:41 PM 4/7/2006, David
At 08:51 AM 4/7/2006, Brad Bonkoski wrote:
I have a form for user interaction and part of it is a select box
with a large number of options from a database ~12K options.
Currently I have a function which queries the DB to get fresh data
and loads the HTML (option value=XY/option) into a string,
At 09:37 AM 4/7/2006, David Clough wrote:
I have a variable containing a string that contains the names of
variables, and want to output the variable with the variables it
contains evaluated. E.g.
$foo contains 'cat'
$bar contains 'Hello $foo'
and I want to output $bar as
Hello cat
I wrote:
You need to EVALUATE the string coming from the database:
Assuming that $sDataField contains the string 'Hello $foo':
$foo = cat;
$sText = eval($sDataField);
RESULT: $sText = Hello cat
http://php.net/eval
I was assuming that you meant that the string Hello $foo --
At 02:41 PM 4/7/2006, David Clough wrote:
I have to parse the string 'Hello $foo' as it comes from the
database: I don't get to construct it.
I did hold out more hope for the eval function, but it seems to me that
this is for PHP code in a database, not to evaluate variables.
David, please
At 11:08 PM 4/5/2006, John Taylor-Johnston wrote:
How can I take enquiry:
input name=searchenquiry type=text value=john
or
input name=searchenquiry type=text value=john johnston
and parse its value to come up with this to do a boolean search
+john
or
+john +johnston
John,
If you're
At 07:48 PM 4/5/2006, Ray Hauge wrote:
I have 57 if/elseif/else statements because of all the different
criteria. Is
it considered better programming practice to use if/elseif/else statements
over a switch(true) case (true false || true || false) syntax?
Here are two seemingly
101 - 200 of 221 matches
Mail list logo