0

I have a keyword "car" in the sentence.

one two three four five six seven car eight nine ten eleven twelve thirteen fourteen fifteen.

i'd like it to echo

three four five six seven car eight nine ten eleven twelve

because 5 words before and 5 words after, including car.


how do i do this?

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by MDanz
0

You mean... three four five six seven <?php echo "car" ?> eight nine ten eleven twelve?

Or...<?php echo "three four five six seven" ?> car <?php echo "eight nine ten eleven twelve" ?>?

Edited by Tekkno: n/a

0

it should echo

three four five six seven car eight nine ten eleven twelve

the keyword is car. so i want to echo 5 words infront and behind of it and including car .... so for any keyword i do it displays a description.

0

I am not sure I understand what you are trying to do. When you say "keyword", what do you mean? Is this keyword just text on the page? Is it a link? Is it a keyword in a search? You need to be more specific.

0

its for a search engine ..

just say the user types car in a form. it retrieves car from the keywords column.


for result description i want it to display car, with a couple words before it and a couple words after it.. so the user can tell what the result is about. i've stopped using meta tags description because not all websites have meta tags set.

Edited by MDanz: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.