Home  >  Q&A  >  body text

Problem for beginners - phpstorm cannot delete a certain character in the string and reports an error. How to solve it?

<?php

$string='king';

$string{1}='';

echo $string

Warning: Cannot assign an empty string to a string offset in E:\phpstudy\demo1\....

This code is very simple and should be no problem. It can be executed in the video tutorial, but I My computer just reports an error when executing. Is it caused by missing configuration?

WilsonWilson2132 days ago688

reply all(0)I'll reply

No reply
  • Cancelreply