Jump to content

Displays a certain amount of numbers


true2self

Recommended Posts

Hi All,

 

I'm sure this is a newbie question, so please bear with me.

 

I'm displaying the SSN from a database, but I only would like the last four digits shown. Can someone please assist?

 

Here is the echo code

 

$user = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $auser->id . '&course=' . $course->id . '">' . fullname($auser) . "<br /> " . $auser->ssn . '</a>';

 

This is the MySQL code

 

$select_ssn = 'SELECT u.id, u.ssn FROM '.$CFG->prefix.'site u order by u.displayorder';

Link to comment
https://forums.phpfreaks.com/topic/129252-displays-a-certain-amount-of-numbers/
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.