Jump to content

echo produces no output. Code runs with no errors or warnings.


sepoto

Recommended Posts

At this point I think I am willing to pay for the answer. My strpos does not work. My echo does not work. I can't even create my own strpos. My program is ignoring charachters that clearly exist before my very eyes in my debugger.<?php$cnt = strlen($book); for($int=0;$int<$cnt;++$int){ echo $book[$cnt];}?>

Link to comment
Share on other sites

Haris_S should study the difference between $i++ and ++$i .@Sepoto: Without looping, have you verified that your version of PHP supports character indexing of strings? It should be easy enough to do:$str = "Hello";echo $str[1];// should echo 'e'Are you certain that echo itself even works?

Link to comment
Share on other sites

I am not certaun at all. In fact I don't think that it does. Is there a remedy?

Haris_S should study the difference between $i++ and ++$i .@Sepoto: Without looping, have you verified that your version of PHP supports character indexing of strings? It should be easy enough to do:$str = "Hello";echo $str[1];// should echo 'e'Are you certain that echo itself even works?
Link to comment
Share on other sites

You are right! I will get on to fix that right now. Incedentally I finally got strpos working but I do not know how or why it is working now but it did not work before yet. It is as if it magically just started working after I replaced a few charachters in the text file.

Good catch. I didn't even notice that.
Link to comment
Share on other sites

You are right! I will get on to fix that right now. Incedentally I finally got strpos working but I do not know how or why it is working now but it did not work before yet. It is as if it magically just started working after I replaced a few charachters in the text file.
Did you look at the answers in your other post?BTW, just out of curiosity, why did you post three different topics on essentially the same issue? (One being this topic, one being the one I linked above, and the other is here)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...