anarchoi Posted November 7, 2006 Share Posted November 7, 2006 Okay well I'm modifing a php-nuke module to make my own "virtual library" script to make a database of revolutionary working class movement texts and theory.each category has a ID Number (field name= cid) and a author name (field name= title)Both rows are in the table "pages_categories"On my article viewing page, i have a code with a connexion to my DB and a query to show the text in the article. So let's say my text is $textHere's what i want to do:add a code that will look in $text for any others author's name (title) and replace it with a link to the corresponding category (modules.php?name=Bibliotheque&pa=view_author&cid=CID_NUMBER_CORRESPONDING_WITH_TITLE_FROM_DB_HERE)To find the CID we can just check all entried in "CID" and check for the one matching with "title"BUT!!!!!The author's name is in the format "SMITH, John". So the code must remove the character " , " and look for ALL words found in the field "title" in ANY ordersexemple: If "SMITH, John Abraham" is found in "title" then look for "John Abraham Smith" and "Abraham John Smith" and "Smith Abraham John", etc.....THANKS!!!!!!!!!!!!!!!!!!!!!!! Link to comment https://forums.phpfreaks.com/topic/26406-look-for-words-in-variable-orders-and-replace-them-with-link/ Share on other sites More sharing options...
anarchoi Posted November 7, 2006 Author Share Posted November 7, 2006 any help? Link to comment https://forums.phpfreaks.com/topic/26406-look-for-words-in-variable-orders-and-replace-them-with-link/#findComment-120966 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.