Reputation: 1752
I am developing an application were I need to use the next PHP5 code:
<?php
$Hurrengo_Hitza = 'word_3';
$Handiena_MarkID = 0;
$Handiena_Hitzarentzat = -2;
$Hitza_Index = substr($Hurrengo_Hitza , 5);
print $Handiena_MarkID . $Hitza_index . $Handiena_Hitzarentzat;
The result I am looking for is 0 3 -2
and the result I am getting is 0-2
. Which is the problem?
Upvotes: 0
Views: 228
Reputation: 6822
You have a lowercase i in $Hitza_index when printing, while it's uppercase when assigning.
Upvotes: 0
Reputation: 9858
This is just a minor case of typo and case sensitivity.
print $Handiena_MarkID . $Hitza_index . $Handiena_Hitzarentzat;
Notice in that line it says $Hitza_index
and not $Hitza_Index
. Since variables in PHP are case-sensitive, you need to change that to $Hitza_Index
.
Upvotes: 1