Jump to content

php help pls!


Mei_mei

Recommended Posts

Hi there! i really need some help so i'll be verry gratefull if someone could help me ... i'm making a PHP script for a school project ... i need to add suffix and prefix to a chain of letters but i can find the way to do it ... pls if u have any ideas ... let me know ... 10x ...

Link to comment
Share on other sites

I'm not 100% sure what you mean, but if you mean, you need a way to add something to the beginning, and at the en d of a word, or sentence, you can just use variables.

 

Example:

<?php

$prefix = "Beginning|";
$suffix = "|Ending";

$sentence = "Long story Short. The End";

$result = "$prefix  $sentence . $suffix";

echo($result);

?>

 

That would display

Beginning| Long story Short. The End . |Ending

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.