Jump to content

Newbie question


mavera2

Recommended Posts

Is there a shorter way to do this?

 

Not without knowing the context and conditions and values under which it would need to work.

 

What is typically in $userlimit? Is it just the number or is it a longer string of some kind? How is this value being used? Is it in an update query, in which case, you can probably just do it in the query? Is the value (5000) a variable or a fixed number?

 

Just one line of code taken out of context doesn't define a programming problem. Anything we come up with for just that one line would take more statements, but in the overall scheme of what you are doing, once you tell us that, you can probably greatly reduce the number of lines of code.

Link to comment
https://forums.phpfreaks.com/topic/262118-newbie-question/#findComment-1343296
Share on other sites

Is there a shorter way to do this?

 

Not without knowing the context and conditions and values under which it would need to work.

 

What is typically in $userlimit? Is it just the number or is it a longer string of some kind? How is this value being used? Is it in an update query, in which case, you can probably just do it in the query? Is the value (5000) a variable or a fixed number?

 

Just one line of code taken out of context doesn't define a programming problem. Anything we come up with for just that one line would take more statements, but in the overall scheme of what you are doing, once you tell us that, you can probably greatly reduce the number of lines of code.

 

Thank you for reply.

 

$userlimit was a 90-100 character long string.

It is used to mention user about his current limit, and limit options.

5000 is a fixed value.

 

 

Link to comment
https://forums.phpfreaks.com/topic/262118-newbie-question/#findComment-1343340
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.