Archive for February, 2010

quick fix | No Comments | February 8th, 2010

use this function ::

function first_sentence($content) {

    $pos = strpos($content, '.');

    if($pos === false) {
        return $content;
    else {
        return substr($content, 0, $pos+1);


and then call it like ::

echo first_sentence($content);

quick fix | No Comments | February 8th, 2010

Sometimes code in dreamweaver got space in between. This will make your code very lengthy and hard to read. To remove the space you can use this method in Dreamweaver

1. Open the file (source code)
2. Click CTRL + F
3. Select “Current document” in “Find in” (You can also select the folder if you have multiple files)
4. Search in “Source code”
5. Tick “Use regular expression”
6. Type “[\r\n]{2,}” (without quotes) in “Find”
7. Type “\n” (without quotes) in “Replace”
8. Press “Replace All”

You are done! All the spaces gone.

wordpress | No Comments | February 1st, 2010

just add this

<?php wp_get_archives(‘title_li=&type=postbypost&limit=10′); ?>

it will add title with link inside <li></li>