Here is the problematic code
Expand|Select|Wrap|Line Numbers
- $cBoring = str_pad(trim($this->r[$key]["BORING"]),5,' ',STR_PAD_LEFT);
- $cContainer = str_pad(trim($this->r[$key]["CONTNUMB"]),3,' ',STR_PAD_LEFT);
- $cKey = $this->r[$key]["JOBID"] . $cBoring . $cContainer;
- $rKey = trim($this->r[$key]["reckey"]);
- /*
- I then use this simple test to check the values of each variable */
- if (($rKey != $cKey) ){
- /* here I'm just checking to make sure they are the */same type
- $rtype = gettype ( $rKey );
- $ctype = gettype ( $cKey );
- /*here I'm just capturing the results for my ajax reponse*/
- $fErr = $fErr .' r and c not the same=`'.$rKey.'`-`'.$cKey.'` rType='.$rtype.' cType='.$ctype;
- }
here is the sample input data:
reckey = '83217 1680'
jobid = '83217'
boring = '1 '
CONTNUMB = '680'
The result of both $cKey and $rKey are as follows:
Type = string
Value = (Actual output) r and c not the same=`83217 1680`-`83217 1680` - this is the actual output delimited with the ` to show there are no leading or trailing spaces.