Bifalgorithm post · Computer science one · String Functions

How can you add or remove characters from a PHP string?

How can you add or remove characters from a PHP string? (Computer science one · String Functions) — "The last line extends the string by adding an additional c…

Ideas in this flowchart

  • Modifying characters in a string
  • A character position can be assigned a new value.
  • The string can be extended by adding an additional character.
  • Characters can be removed by setting them to the empty string.
  • $a = "Apples!";
  • $a[5] = "";
  • The resulting string is "Apple!".
Feed/

How can you add or remove characters from a PHP string?

No cover

Channel

Computer science one

1 page

"The last line extends the string by adding an additional character. You can even remove characters by setting them to the empty string.\n\n1 $a = \"Apples!\";\n\n2 $a[5] = \"\";\n\n3 //a is now \"Apple!\""

Flowchart preview
👍
0
0 comments0 shares

Sign in to view and post comments.