![]() |
You run the function when you're looping through the results - not in the query itself.
|
Quote:
PHP Code:
Now if I use the above code as it is in my page it doesn't work, ie. no trimming of the thread-titles. I've tried changing the value of $chars from -1 to other values like 45 but that doesn't work either. Do I need to change anything else for this code to correctly trim the thread-titles? Can you please give an example of the code I need to use? |
fetch_trimmed_title() is a function, you use it like any other function such as substr() or rand() or mysql_query() or something. It is just a user defined function, nothing special.
Quote:
|
what does the -1 in ' integer $chars = -1 ' mean?
Can someone refer me to a website / tutorial which would answer these kind of questions? |
Look in the function's code - you even posted it. It's one of the first lines of the actual function.
|
Quote:
|
Dismounted meant you should read the PHP code, for the function, you yourself have already posted...
https://vborg.vbsupport.ru/showpost....8&postcount=12 (Read it line by line if you need to :p) |
that doesn't answer my question, and you're not helping.
|
Go to the 15th line of the PHP code you posted... I don't need to help you. The answer is staring you in the face. ;)
If, after you've read the 15th line (and the few lines after it) and I mean after! (No cheating :p) You still don't understand, post the 15th line and 3 lines underneath it. |
All times are GMT. The time now is 09:05 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|