Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

editing part of a page

Featured Replies

hi all

 

ok i have set up fck editor

 

and i whant it to edit just part of a a page eg about_us.php but just change part of the file between 2 tags

 

<?php include "inc/header1.php" ?>
<title></title>
<?php include "inc/header2.php" ?>
<?php $image = "about_us.jpg"; ?>

<!-- BEGIN EDIT 1 -->

i would like this only to be  editable thank you



</p><!-- END EDIT 1 -->

<?php include "inc/footer.php" ?>

thanks again

You'd need to use preg_replace

 

// $content = contents of file as string
// $new_content = 'lol';

$tag1 = '<!-- BEGIN EDIT 1 -->';
$tag2 = '<!-- END EDIT 1 -->';

$content = preg_replace("/$tag1(.*?)$tag2/", "$tag1 $new_content $tag2", $content);

 

Then write $content back to the file.

  • Author
You'd need to use preg_replace

 

// $content = contents of file as string
// $new_content = 'lol';

$tag1 = '<!-- BEGIN EDIT 1 -->';
$tag2 = '<!-- END EDIT 1 -->';

$content = preg_replace("/$tag1(.*?)$tag2/", "$tag1 $new_content $tag2", $content);

 

Then write $content back to the file.

thank you just what i was after

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.