472,784 Members | 943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,784 software developers and data experts.

Can someone spot what I'm missing here...

....before I lose what remains of my mind?

The problem is that the tetragraph 'PPLL' is apparently not being
recognised for some reason I can't begin to see.

The test code is:

echo 'before the if: ' . $field[10] . '<br>' ;
if ( $field[10] == 'PPLL' )
{
echo 'IN the if: ' . $field[10] . '<br>' ;
}
echo ' at the switch: ' . $field[10] . '<br>' ;

From which the output is:

before the if: PPLL
at the switch: PPLL
Originally it was not being seen as a case inside a switch (mentioned
in the last test code line). So I copied it into an IF in front of
the switch as you see in the test code. But it's still not being
seen.

Whatever's going on must be something simple and very *very* stupid,
but for the life of me I cannot see it.

A million grovelling thanks to anyone who spots it.

Margaret
--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)
Jul 17 '05 #1
1 1502
Found it. The database turns out not to be as clean as claimed: some
of the records still have extra spaces in some of the fields. Calling
trim() makes the problem go away.

*sigh*

I had written:
...before I lose what remains of my mind?

The problem is that the tetragraph 'PPLL' is apparently not being
recognised for some reason I can't begin to see.

The test code is:

echo 'before the if: ' . $field[10] . '<br>' ;
if ( $field[10] == 'PPLL' )
{
echo 'IN the if: ' . $field[10] . '<br>' ;
}
echo ' at the switch: ' . $field[10] . '<br>' ;

From which the output is:

before the if: PPLL
at the switch: PPLL
Originally it was not being seen as a case inside a switch (mentioned
in the last test code line). So I copied it into an IF in front of
the switch as you see in the test code. But it's still not being
seen.

Whatever's going on must be something simple and very *very* stupid,
but for the life of me I cannot see it.

A million grovelling thanks to anyone who spots it.

Margaret


--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

114
by: muldoon | last post by:
Americans consider having a "British accent" a sign of sophistication and high intelligence. Many companies hire salespersons from Britain to represent their products,etc. Question: When the...
12
by: J. David Kent | last post by:
I have a web page with a form about halfway down the page. Instead of starting at the top of the page when it is loaded I would like it to go directly to the top of the form. Can this be done? ...
3
by: JKop | last post by:
I have some code which when compiled on my system prints: <output> AnyClass Constructor for: blah AnyClass Copy Constructor for: Copy of blah AnyClass Copy Constructor for: Copy of Copy...
1
by: antipode | last post by:
That's about it. If I make a cursor of any size and color depth, the button to set the hot spot stays disabled. I'm at my wit's end, and yet I know it's got to be something stupid I'm missing.
2
by: Erik | last post by:
Hi Everyone, I'm having real problems compiling some source for eVC4++. The errors I am getting are below: It all seems to be centred around winsock. If I move the afsock.h reference to before...
3
by: Guy Penfold | last post by:
Hi all, I have an asp.net application exhibiting rather alarming behaviour. Among other things, the application provides actors with an online profile that allows them to showcase their skills,...
8
by: Steven Spencer \(Spinalogic\) | last post by:
Dim dlg As New dlgChangeDate Dim fromdate As DateTime = dlg.GetaDate(System.DateTime.Now, "Please Enter the Start of the Holiday") If (Not fromdate.CompareTo(New DateTime(1, 1, 1, 1, 1, 1, 1))...
42
by: NwsGrp1 | last post by:
A colleague is reading through some C articles and was asked if there are any errors in the following code. Neither of us can spot any issues, I have compiled it with VC8 and GCC at their strictest...
2
by: eloi-ribeiro.blogspot.com | last post by:
Hi, I'm having a problem with a query. I'm running Access 2000 and a table with 35000 rows. The table contains several visits to the spots with a CODE (spot code) and DATE (visit date)...
10
by: Jim Langston | last post by:
I use a game engine using MSVC++ .net 2003 and have no problems. Some users of DevC++ who use the same engine crash at times when a copy of this structure is the return variable. I don't have...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.